3 ms·
Wait, JavaScript? Under the hood, JavaScript strings have a variety of encodings, but I can't think of any API that forces you to use a specific encoding.
by Yoric 4y ago
Wait, JavaScript? Under the hood, JavaScript strings have a variety of encodings, but I can't think of any API that forces you to use a specific encoding.
- anonymoushn 4y agothe length property and the charAt method for example are defined to use UTF-16. length is the length in UTF-16 code units and charAt returns a UTF-16 code unit at a certain index.
- mlindner 4y agoThat's something that should be addressed with the javascript steering committees (if such things exist) so that the standard is updated to support UTF-8.