News for hackers. Stuff that matters.
Re:How UTF-8 Works by nwallin on Tuesday February 08, 2022 @04:16PM (#30264827)
> There are many reasons why UTF-8 is a better encoding but UTF-16 does at least have the benefit of being simpler.

Big endian or little endian?

Re:How UTF-8 Works by ts4z on Tuesday February 08, 2022 @05:35PM (#30265831)
And did they handle surrogate pairs correctly?

My team managed a system that did a read from user data, doing input validation. One day we got a smart quote character that happened to be > U+10000. But because the data validation happened in chunks, we only got half of it. Which was an invalid character, so input validation failed.

In UTF-8, partial characters happen so often, they're likely to get tested. In UTF-16, they are more rarely seen, so things work until someone pastes in emoji and then it falls apart.

Re:How UTF-8 Works by cryptonector on Tuesday February 08, 2022 @05:56PM (#30266049)
LOL