|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
Hi all,
In my mysql database i have stored accounts name in japanese character. All accounts has been displayed in a page sort by name. So i use "ORDER BY name" in my query. But my client complain that the names are not sorted correctly. Is there anything i have to do in case of japanese or non-english character sorting? please help.... thanks in advance.
__________________
ruhul |
|
#2
|
|||
|
|||
|
It will depend on which character set you are using.
Prior to MySQL 4.1 you can only specify the character set for the entire server. To do so you use the --default-character-set option. For japanese you would most likely want sjis or ujis. So in your config file you could use: Code:
[mysqld] default-character-set=sjis In MySQL 4.1 you can now specify both character set and collation down to the column level (More complete than most RDBMSs). To read more about that check out http://www.mysql.com/doc/en/Charset.html |
|
#3
|
||||
|
||||
|
Resurrecting this topic. I think the problem here is more than one of just collation. There is no way to easily order Japanese unless your characters are all in kana (hiragana or katakana).
A simple case: Suppose you have the Kanji nihon (??) hi (day - ??) There is no way for mysql to know whether the kanji for day is read 'hi' or 'ni' etc and so it can't order them. On the other hand, if you are ordering kana, you can go with the previous suggestion. |
![]() |
| Viewing: Dev Shed Forums > Databases > MySQL Help > japanese character sorting |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|