logoalt Hacker News

sphtoday at 7:15 AM1 replyview on HN

True, but not all non-UTF8 bytestrings contain 0xFF bytes, so it’s not very useful in practice.


Replies

da_chickentoday at 7:50 AM

Yes, I agree.

It's more common for programs that say they support UTF-8 to not really do so at all. It wasn't that long ago that "UTF-8" support was often just single byte, so it was little more than ASCII. Even now it's common for programs to choke on the optional BOM. Yes, it is redundant, congratulations. The spec still explicitly allows it. Three and four byte character support is still not the best, too.

show 1 reply