Re: Sorting with icelandic letters
Posted by: Alexander Barkov
Date: April 25, 2006 02:41AM

Most likely character set of your client program is not utf8.
Which client tool are you using?

If it is mysql.exe, which is a DOS-alike application using cp850
character set, then you need to do "SET NAMES cp850".
If it is some GUI application, then most likely need to do "SET NAMES latin1".


I can perfectly sort according to Icelanding rules:


mysql> show create table t1;
+-------+----------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+-------+----------------------------------------------------------------------------------------------------------------------------------------+
| t1 | CREATE TABLE `t1` (
`a` varchar(64) character set utf8 collate utf8_icelandic_ci default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 |
+-------+----------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> insert into t1 values ('Ö'),('R'), ('X'),('Y');;
Query OK, 4 rows affected (0.00 sec)
Records: 4 Duplicates: 0 Warnings: 0

mysql> select a, hex(a) from t1 order by a;
+------+--------+
| a | hex(a) |
+------+--------+
| R | 52 |
| X | 58 |
| Y | 59 |
| Ö | C396 |
+------+--------+
4 rows in set (0.00 sec)


Please make sure that after insert, Ö corresponds to C396 hex value.
Otherwise, you have wrong client side character set settings.

Options: ReplyQuote


Subject
Views
Written By
Posted
5314
March 30, 2006 11:18AM
Re: Sorting with icelandic letters
2205
April 25, 2006 02:41AM


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.