Character ă cannot btoa
wishcn opened this issue · 1 comments
wishcn commented
Character ă cannot btoa
Error:
Uncaught DOMException: Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.
dankogai commented
btoa
only accepts \x00
to \xff
but 'ă'.charCodeAt(0) === 259 === 0x103 > 0xFF
. It is a feature.
https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/btoa