Problem with swedish characters...
Posted by: Johan Andersson
Date: December 05, 2005 11:50AM

Hi

I don't understand how MySQL sort table values beginning with a swedish character.

My MySQL version is 4.1.8 with variables;
character_set_server = latin1
collation_server = latin1_swedish_ci

I create a test table using the command mysql> create table test (name varchar(20));
I populate the table with the following (swedish) names; Carl,Martin,Sven,Adam,Åke,Ärland,Östen
Now issuing a mysql> select * from test order by name; I get the following result
+--------+
| name |
+--------+
| Adam |
| Ärland |
| Åke |
| Östen |
| Carl |
| Martin |
| Sven |
+--------+
7 rows in set (0,01 sec)

For those unfamiliar to the swedish alphabet, the proper sort order is A,B,C.,..Y,Z,Å,Ä,Ö

So I was of course expecting the result:
Adam
Carl
Martin
Sven
Åke
Ärland
Östen

To check, I issue: mysql> show table status;
and there is appears that for my newly created table 'test', the collation is latin1_swedish_ci (as it should)

Anyone knows what the problem is?!

Options: ReplyQuote


Subject
Views
Written By
Posted
Problem with swedish characters...
5928
December 05, 2005 11:50AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.