3 ms·
> Which I expect is what TFA means by "UTF-16 semantics". The article says "(potentially-invalid) UTF-16 semantics". The "potentially-invalid" part means that
by hsivonen 7y ago
> Which I expect is what TFA means by "UTF-16 semantics".
The article says "(potentially-invalid) UTF-16 semantics". The "potentially-invalid" part means that the JavaScript programmer can materialize unpaired surrogates. The "semantics" part means that the JavaScript programmer sees the strings acting as if they were potentially-invalid UTF-16 even when the storage format in RAM is actually Latin1 in SpiderMonkey and V8.