Re: Sorting norwegian names problem aa, a, b, æ, ø, å... aa is sorted before a, should be like å
Posted by: Peter Gulutzan
Date: November 15, 2007 08:48AM

This is what happens on my computer.

mysql> use test
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> SET NAMES utf8;
Query OK, 0 rows affected (0.00 sec)

mysql> CREATE TABLE t (s1 char(40) COLLATE latin1_danish_ci NOT NULL)
-> ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_danish_ci;
Query OK, 0 rows affected (0.09 sec)

mysql> INSERT INTO t VALUES
-> ('Aasen'),('Åatute'),('Alfa'),('Bravo'),('Charlie'),('Ærlig'),('Østen'),('Åbrekke');
Query OK, 8 rows affected (0.06 sec)
Records: 8 Duplicates: 0 Warnings: 0

mysql> SELECT s1 FROM t ORDER by s1;
+----------+
| s1 |
+----------+
| Aasen |
| Alfa |
| Bravo |
| Charlie |
| Ærlig |
| Østen |
| Åatute |
| Åbrekke |
+----------+
8 rows in set (0.00 sec)

If you get a different result, then probably you have set one of
the 'character...' variables incorrectly.

MySQL does not treat 'aa' specially.

Peter Gulutzan
MySQL AB

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Sorting norwegian names problem aa, a, b, æ, ø, å... aa is sorted before a, should be like å
7602
November 15, 2007 08:48AM


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.