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?
@Steffen started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
When decoding base64 encoded strings padded with trailing '=' the '=' seem to get replaced with \x00:
Looks like a glitch in the base64 decoder?