News for hackers. Stuff that matters.
Re:The UTF-8-Everywhere Manifesto by dfox on Sunday April 29, 2012 @09:39PM (#3907671)
UTF-8 is explicitly designed in such way that unix API dont have to care about it and such that lexicographic ordering of utf-8 encoded byte streams is same as lexicographic ordering of unicode code point vectors (which arguably almost never is what you care about when sorting text strings). Both of these features are result of conscious design and not some random coincidence.

As for sorting text strings of any kind (which has mostly nothing to do with unicode), you have to care about what user expects, which is dependent on locale and sometimes even on user's preference. Algorithms to do text sorting are for each separate locale mostly non-trivial, but fortunately can be generalized into one relatively straight-forward algorithm (similar to unicode normalization) involving pretty large database and some special cases.

When you are sorting bit strings you are sorting lexicographically, but that is usually not what you should be doing.

Re:The UTF-8-Everywhere Manifesto by fleitz on Sunday April 29, 2012 @09:55PM (#3907708)
"When you are sorting bit strings you are sorting lexicographically, but that is usually not what you should be doing."

That's my point about it being bullshit, it sounds like a feature you might want, but honestly it's useful to very few people.

Re:The UTF-8-Everywhere Manifesto by ybungalobill on Tuesday May 01, 2012 @05:44PM (#3916516)
Man, the article doesn't try to argue for or against UTF-8 based on lexicographical order. It's in the "facts" section, and it's a correct fact. So it's just as neutral as "Widechar is 2 bytes [...] 4 on others." or "In both [...] characters may take up to 4 bytes".