When decoding base64 encoded strings padded with trailing '=' the '=' seem to get replaced with \x00:
x = btoa('H') // "SA=="
atob(x) // "H\x00\x00"
x = btoa('Ha') // "SGE="
atob(x) // "Ha\x00"
x = btoa('Hal') // "SGFs"
atob(x) // "Hal"
Looks like a glitch in the base64 decoder?
Wow, thanks - I have no idea how that didn't get spotted.
I've just put a fix in, so the latest xcutting edge builds should have this fixed
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem