Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> The preferred alphabetical sorting would be [ "Ähnlich", "Äpfel", "Bären", "Käfer", "küssen" ]

As an example of a conflicting locale, Swedish would have Äpfel after Käsen!



Like "Aalborg" being after "Zaragoza" in a Danish sorting. And that's more tricky with "aa" being treated as a single character in Danish.


This leads to fun things like the regex [a-z][a-z] not matching the string "aa" in SQL Server when using the Danish collation.


Aalborg is one of very few exceptions that even in Danish can commonly be spelled with “aa” as a replacement for “å” (the single character).

Just like ae for æ.


Unfortunately, the exceptions only appear in names and proper nouns, which are where you generally want sorting the most.


Yes, that is an interesting case!

"Ä" is a separate letter in the Swedish alphabet: https://en.wikipedia.org/wiki/Swedish_alphabet

In German on the other hand, "Ä" is part of the language but not part of the alphabet and it is simply expanded to "AE" as in the previous comment.


EDIT: following comment is specifically about German German, Swiss German etc do not always work the same

> In German on the other hand, "Ä" is part of the language but not part of the alphabet

Some people claim that, but I wouldn't take that as an authoritative statement. Plenty language authorities disagree, since "ä" and "ae" are not interchangeable.

> it is simply expanded to "AE" as in the previous comment

Only in some contexts (lists of names predominantly), generally "ä" is sorted after "a". E.g. the Duden dictionary goes "zahlen", "zählen", "Zah­len­an­ga­be".


There is also the topic of language revisions. In my experience, gnu tools sort swedish correctly by the old rules, those that collate w with v, i.e w and v sort as if they are equal (war before ver before whar).

However, in 2006 the arguably authorative dictionary changed to sort w after v. Gnu tools have yet to catch up with this, what I can see. :)




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: