7 ms·
> What part of that process requires UTF-16? JavaScript doesn't require UTF-16; it just requires Unicode. You could use UTF-8 in your JavaScript implementation
by pkmays 14y ago
> What part of that process requires UTF-16? JavaScript doesn't require UTF-16; it just requires Unicode. You could use UTF-8 in your JavaScript implementation as well.
Actually, JavaScript _does_ require UTF-16. From the ES5.1 spec:
> A conforming implementation of this Standard shall interpret characters in conformance with the Unicode
Standard, Version 3.0 or later and ISO/IEC 10646-1 with either UCS-2 or UTF-16 as the adopted encoding
form, implementation level 3. If the adopted ISO/IEC 10646-1 subset is not otherwise specified, it is presumed
to be the BMP subset, collection 300. If the adopted encoding form is not otherwise specified, it presumed to
be the UTF-16 encoding form.