Hacker News new | ask | show | jobs
by trurl42 781 days 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).

1 comments

One ambiguity here might be that Javascript defines strings as UTF-16, but JSON defines strings as UTF-8.