News for hackers. Stuff that matters.
Re:PHP Doesn't Suck Anymore by trurl42 on Saturday May 04, 2024 @07:04AM (#40256657)
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).

Re:PHP Doesn't Suck Anymore by kiitos on Sunday May 05, 2024 @08:53PM (#40270088)
One ambiguity here might be that Javascript defines strings as UTF-16, but JSON defines strings as UTF-8.