3 ms·
Looks like Javascript source code is required to be processed as UTF-16: ECMAScript source text is represented as a sequence of characters in the Unicode chara
by Avernar 10y ago
Looks like Javascript source code is required to be processed as UTF-16:
ECMAScript source text is represented as a sequence of characters in the Unicode character encoding, version 3.0 or later. [...] ECMAScript source text is assumed to be a sequence of 16-bit code units for the purposes of this specification. [...] If an actual source text is encoded in a form other than 16-bit code units it must be processed as if it was first converted to UTF-16.
- dietrichepp 10y agoRight, but the UTF-16 is read code point by code point, not code unit by code unit. At that point, it might as well be UTF-8 or UTF-32.