Page 1 of 1
@Fred Sortroutine
Posted: Thu May 04, 2006 6:54 am
by Pinhead
Hello,
the sort-procedure place ü,ö,ä at the end of the list. Is it possible
to implement for german User that sort use internel a=ä,u=ü,o=ö,
because ü,ö,ä at the end oft the list is wrong..
Greetings Volker
Posted: Thu May 04, 2006 1:18 pm
by Thorsten1867
That would be a good idea!!!
Posted: Thu May 04, 2006 1:30 pm
by Fred
This is not realistic to do that for all langages.. You can still replace all these letter with the non-accent one, sort it, and put back the original strings in it.
Posted: Thu May 04, 2006 1:44 pm
by Pinhead
so I do...
Thanx for the Answer!
Your Sort-Procedure is very very fast!
Posted: Fri May 05, 2006 7:58 am
by Michael Vogel
Fred wrote:This is not realistic to do that for all langages.. You can still replace all these letter with the non-accent one, sort it, and put back the original strings in it.
Can be complicate with unicode, but using one byte chars, the sort routine could have an additional parameter pointing to a 256 byte table which includes the sort order you like.
But maybe all (western) countries would sort in the same way?
Concentrating on the alphabet (the order of cyphers etc. should be equal everywhere), I would say, it is typical to put all variations of 'a' at the beginning, with accents (á, à, ä, å, ã, â, æ etc.) After that there is 'b', then 'c' (followed by cedille?) etc.
Posted: Fri May 05, 2006 10:18 am
by Trond
No. Let me show you a sorted list in my language
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
æ
ø
å
Posted: Fri May 05, 2006 10:45 am
by Michael Vogel
Trond wrote:No. Let me show you a sorted list in my language
a
:
y
z
æ
ø
å
Will that be the same in finland, sweden, danmark etc.?
Posted: Fri May 05, 2006 10:55 am
by utopiomania
I think you can (should) use the CompareString() API to compare strings correctly for different locales.
The rules are very complex, so better leave it to an API and some suitable sorting algorithm.
Posted: Fri May 05, 2006 11:23 am
by maw
Will that be the same in finland, sweden, danmark etc.?
No, we dont even have the same characters
In Sweden we use: ABCDEFGHIJKLMNOPQRSTUVWXYZÅÄÖ
Posted: Fri May 05, 2006 11:28 am
by Michael Vogel
maw wrote:Will that be the same in finland, sweden, danmark etc.?
No, we dont even have the same characters
In Sweden we use: ABCDEFGHIJKLMNOPQRSTUVWXYZÅÄÖ
Bad luck, I just tried it
unused chars wouldn't be a problem, but chars in different order ('Ä' after 'Å' in swedish, between 'A' and 'B' in german etc.) would lead to implement different sorting arrays...