News for hackers. Stuff that matters.
Re:Unicode is harder than you think by deadbeeves on Tuesday July 25, 2023 @06:14PM (#36870386)
But UTF-8 is just a way to encode a number as a variable-length string of octets. Why would you be unable to encode, say, a terminating U+D800 as a string of three bytes at the end of a UTF-8 stream?
Re:Unicode is harder than you think by skitter on Tuesday July 25, 2023 @06:28PM (#36870550)
Because that's how UTF-8 is defined[1]. WTF-8 lifts that restriction.

[1] https://simonsapin.github.io/wtf-8/#utf-8

Re:Unicode is harder than you think by deadbeeves on Tuesday July 25, 2023 @06:41PM (#36870708)
It doesn't sound very annoying, then. You use the exact same encoding scheme, but skip a verification step. Actually it sounds more convenient.
Re:Unicode is harder than you think by jraph on Tuesday July 25, 2023 @06:48PM (#36870803)
Still potentially annoying if you deal with some other code that expects UTF-8 proper and you pass it a wtf-8 string that fails the lifted verification.