Python does not sort Unicode correctly
data = [unicode('č', "cp1250"),
unicode('d', "cp1250"),
unicode('a', "cp1250")]
data.sort(key=unicode.lower)
for x in range(0,len(data)):
print data[x].encode("cp1250")
and I get:
a d č
It should be:
a č d
Slovenia The alphabet is as follows: abc č def g .....
I am using WIN XP (active codepage: 852 - Slovenia). Can you help me?
+2
source to share