[whatwg] Adding a btoa overload that takes Uint8Array
Boris Zbarsky
bzbarsky at MIT.EDU
Mon Mar 4 09:09:50 PST 2013
The problem I'm trying to solve is sending Unicode text to consumers who
need base64-encoded input. Right now the only "sane" way to do it (and
I quote "sane" for obvious reasons) is something like the example at
https://developer.mozilla.org/en-US/docs/DOM/window.btoa#Unicode_Strings
It seems like it would be better if the output of a TextEncoder could be
passed directly to btoa. But for that we need an overload of btoa that
takes a Uint8Array.
Thoughts?
-Boris
More information about the whatwg
mailing list