An abstract JS string element is a concrete UTF-16 code unit, encoding an abstract Unicode code point. Concretely it's likely UTF-8. Uh-huh.
@littlecalculist “Concretely it’s likely UTF-8”? I thought most ECMAScript engines used UTF-16 internally?
-
-
@mathias I'm not sure, but I thought at least some use UTF-8. I'll have to check.Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@mathias@littlecalculist In general, ECMA requires strings to be sequences of 16-bit unsigned integers, not just valid UTF-16 code points. -
@ejpbruel@littlecalculist I know. It’s easier to think of it as UCS-2 + surrogates, IMHO. http://mathiasbynens.be/notes/javascript-encoding …
End of conversation
New conversation -
-
-
.
@mathias@littlecalculist v8 and recent JSC can use ascii when the string only has such chars. -
This Tweet is unavailable.
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.