after reviving some old code I wrote a couple of years ago to find out why the Sort library doesn't seam to work, I re-found out why.
It doesn't handle Swedish letters as supposed.
The Swedish alphabet has ÅÄÖ as letters after Z. In this order: ABC...XYZÅÄÖ
Two things doesn't work in the Sort library:
1. sorting Swedish characters in correct order - I get ÄÅÖ instead of ÅÄÖ (could have with the old ASC-II representation to do). It's always a hassle to sort Swedish...
2. the #PB_Sort_NoCase flag doesn't ignore the case on åäöÅÄÖ. This problem should perhaps also appear on special French characters? How is it with the German ÄÖÜ and eszet (that I can't reproduce on my keyboard right now... )
If this complies with the other OS's is not known by me. But probably.
My current version of PB is 5.70 LTS (x86)
All righty, then. Some code to show what I'm talking about:
Code: Select all
NewList fa.s()
AddElement(fa())
fa() = "ö"
AddElement(fa())
fa() = "Å"
AddElement(fa())
fa() = "v"
AddElement(fa())
fa() = "W"
AddElement(fa())
fa() = "ä"
AddElement(fa())
fa() = "Ö"
AddElement(fa())
fa() = "w"
AddElement(fa())
fa() = "V"
AddElement(fa())
fa() = "Ä"
AddElement(fa())
fa() = "å"
AddElement(fa())
fa() = "z"
AddElement(fa())
fa() = "U"
AddElement(fa())
fa() = "Z"
AddElement(fa())
fa() = "u"
SortList(fa(), #PB_Sort_NoCase)
testString.s = ""
ForEach fa()
If testString > UCase(fa())
Debug "Wrong: " + fa() + " < " + testString
Else
Debug fa()
EndIf
testString = UCase(fa())
Next
The correct order for this program would be:U
u
v
V
W
w
z
Z
Ä
Å
Ö
Wrong: ä < Ö
å
ö
U
u
v
V
W
w
z
Z
Å
å
ä
Ä
ö
Ö