Re:ASCII and Unicode quotation marks
by moron4hire on Wednesday September 13, 2017 @07:14PM
(#15243625)
The Unicode way makes sorting easier. Your way would require special knowledge about the characters to know that ä should sort directly after a, rather than directly before ë.
[ Parent
| on HN ]
Re:ASCII and Unicode quotation marks
by jrochkind1 on Wednesday September 13, 2017 @10:01PM
(#15244468)
In fact this requires special language-specific knowledge anyway (which unicode provides in some tables and algorithms actually). In some languages ä should sort exactly as if it were 'a'. "aa", "äb", "ac". In others it should sort as a distinct letter (but not necessarily between 'a' and 'b'). Different Latin languages sort differently, I'm not sure if exact UTF-8 (or UTF 16 or UTF 32) byte ordering is actually appropriate collation in any latin-alphabet language.
But I do suspect it had something to do with ascii compatibility, I don't recall what. Very little of unicode is accidental, there's usually some reason for whatever in it.
Re:ASCII and Unicode quotation marks
by cassowary on Wednesday September 13, 2017 @11:39PM
(#15244830)
some languages even sort
aa ah az ba bh bz ca cz ch
treating "ch" as a single letter that comes between c and d.
or
ab ah az b c .... z aa
treating aa the same as a separate letter at the end of the alphabet.
Then there's other rules for sorting that aren't directly alphabetic, like that names beginning with "Mc" should be treated as "Mac" or "St " as "Saint ".
"10 cats" should sort after "2 cats", not before it.
Anyone who tries to sort by just numeric ordering is doing it wrong.