Native base64 utility methods

Mathias Bynens mathias at
Mon May 5 03:03:01 PDT 2014

On 5 May 2014, at 10:48, Claude Pache <claude.pache at> wrote:

> In my view, if `atob` and `btoa` were to enter in ES, it should be in Appendix B (the deprecated legacy features of web browsers), where it would be in good company with the other utility that does an implicit confusion between binary and ISO-8859-1-encoded strings, namely `escape/unescape`.

How do `atob` and `btoa` do any sort of implicit conversion between binary and any other encoding? Their behavior is well-defined, and they’re explicitly limited to extended ASCII.

I don’t think this is Annex B material regardless — this is not a legacy feature.

> We should be able to define a better designed function (and with a less silly name, while we're at it).

That would kind of defeat the purpose IMHO. We’re stuck with `atob`/`btoa` anyway in browsers — adding yet another name for the same thing does not really help.

More information about the es-discuss mailing list