I'm trying to convert the base64 encoded string "CDA=
" into a binary buffer, using JavaScript. I have tried calling the function atob
, but the result is always an empty array.
I have tried atob
with character strings, that I encoded with btoa
, and atob
provides the expected result. So it seems that it doesn't always fail, but probably only when the base64 string represent a binary data. From the internet, I see that binary data also should be managed... Does anyone have an explanation to this behaviour ?