Incorrect sorting of the Scandinavian alphabets |
Incorrect sorting of the Scandinavian alphabets |
Christian J |
Oct 23 2006, 06:11 PM
Post
#1
|
. Group: WDG Moderators Posts: 9,658 Joined: 10-August 06 Member No.: 7 |
Not only PHP sorts the Swedish letters å, ä and ö incorrectly, now I noticed that javascript does the same, and also in Danish and Norwegian. The arrays below should be in the correct order for each language:
CODE window.onload=function() { var se=['å','ä','ö']; // Swedish var dk=['æ','ø','å']; // Danish, apparently same as Norwegian alert(se.sort()); alert(dk.sort()); } Note that Danish and Norwegian use a different order than Swedish. But in the sorted javascript alerts the Swedish letters are incorrectly sorted as "ä,å,ö", while Danish and Norwegian are (again incorrectly) sorted as "å,æ,ø". The same error appear in IE, Opera and Firefox. At least Opera's Norwegian creators should know their own alphabet, so am I correct in assuming that all three browser vendors deliberately follow some flawed convention? |
Darin McGrew |
Oct 24 2006, 01:49 PM
Post
#2
|
WDG Member Group: Root Admin Posts: 8,365 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
QUOTE wouldn't a typical English-speaking user expect "å" and "ä" to be treated as "a", and "ö" to be treated as "o"? I can't say whether I'm "a typical English-speaking user", but I would expect a Swedish page to sort Swedish names according to the normal Swedish rules for alphabetizing names. I would expect Danish and Norwegian pages to use the Danish and Norwegian alphabetizing rules (respectively). And so on. |
Christian J |
Oct 24 2006, 02:21 PM
Post
#3
|
. Group: WDG Moderators Posts: 9,658 Joined: 10-August 06 Member No.: 7 |
QUOTE wouldn't a typical English-speaking user expect "å" and "ä" to be treated as "a", and "ö" to be treated as "o"? I can't say whether I'm "a typical English-speaking user", but I would expect a Swedish page to sort Swedish names according to the normal Swedish rules for alphabetizing names. I would expect Danish and Norwegian pages to use the Danish and Norwegian alphabetizing rules (respectively). And so on.But what if you (the English-speaking user) don't know the Swedish rules? Suppose you're looking for a name like "Åsa" or "Örjan" in a very long alphabetically sorted list, were in the list would you begin to look? |
Lo-Fi Version | Time is now: 26th April 2024 - 02:26 PM |