3 ms·
JavaScript uses (used, until a recent version) UCS-2, not UTF-16!
by wereHamster 9y ago
JavaScript uses (used, until a recent version) UCS-2, not UTF-16!
- ygra 9y agoMost JavaScript implementations have a bunch of different string types used internally, depending on what you're doing with the string. In-memory representation has no bearing on the API visible to the outside world. And while the JavaScript APIs only allow you to deal with UCS-2, the string contents themselves are, in fact, usually UTF-16.