3 ms·
And with that you're completely wrong, since strings in JavaScript are UTF-16. It just so happens that your example consists of two UTF-16 codepoints. (Node.j
by trurl42 2y ago
And with that you're completely wrong, since strings in JavaScript are UTF-16.
It just so happens that your example consists of two UTF-16 codepoints.
(Node.js' Buffer uses UTF-8 by default).
- kiitos 2y agoOne ambiguity here might be that Javascript defines strings as UTF-16, but JSON defines strings as UTF-8.