3 ms·
JavaScript source can be encoded in any way that the browser can handle, yes. Within the JS language, strings are represented as sort-of-UCS-2-sort-of-UTF-16 [
by ender7 13y ago
JavaScript source can be encoded in any way that the browser can handle, yes.
Within the JS language, strings are represented as sort-of-UCS-2-sort-of-UTF-16 [0]. This is one of the few problems with JS that I think merits a backwards-compatibility-breaking change.
[0] http://mathiasbynens.be/notes/javascript-encoding http://mathiasbynens.be/notes/javascript-encoding