javascript-natural-sort icon indicating copy to clipboard operation
javascript-natural-sort copied to clipboard

Sorting umlauts characters Ä, Ö, Ü

Open diogoalves opened this issue 12 years ago • 2 comments

In German letters with umlaut (Ä, Ö, Ü) are treated generally just like their non-umlauted versions; ß is always sorted as ss. This makes the alphabetic order Arg, Ärgerlich, Arm, Assistent, Aßlar, Assoziation. For phone directories and similar lists of names, the umlauts are to be collated like the letter combinations "ae", "oe", "ue". This makes the alphabetic order Udet, Übelacker, Uell, Ülle, Ueve, Üxküll, Uffenbach.

http://en.wikipedia.org/wiki/Alphabetical_order

it could be done replacing Ä, Ö, Ü by A, O, U .

but I am not sure where to write this in code.

diogoalves avatar Nov 19 '12 21:11 diogoalves

For now, you should check out sugar.js.

Mottie avatar Feb 10 '13 18:02 Mottie

I just wanted to note that strings containing umlauts are handled differently from others by this module.

Strings with umlauts are handled by localeCaseCompare, strings without are simply passed to <. This leads to very mixed results.

oliversalzburg avatar Apr 24 '17 18:04 oliversalzburg