Click to See Complete Forum and Search --> : Multilingual ORDER problems...?


gilly914
February 4th, 2006, 06:24 AM
I created a table with names of cities, which are in Hebrew...

using :
SELECT * FROM Cities ORDER BY Name

But for some reason, the order that the cities are given to me aren't exactly according to the hebrew ABC... It's close, but with a couple of mistakes in the middle...

Did anybody ever run into this problem???
I work only in Hebrew, does this happen in English too???

Is there another simple way to sort names from a database by ABC...?

exterminator
February 4th, 2006, 11:56 AM
What database are you using? Can you please show the create table DDL? Regards.

gilly914
February 5th, 2006, 08:23 AM
I'm using MySQL, the Name field is defined as Varchar(80)

exterminator
February 5th, 2006, 09:19 AM
You still didn't show me the table schema ... but just the column type..I am not expert at MySQL...but here are some things I found out that can help...check out..

1. Which database version are you using? Does it supports UTF-8?

2. Check the odbc connection char set settings. Use "SET NAMES hebrew"... See details here - Connection Character Sets (http://dev.mysql.com/doc/refman/5.0/en/charset-connection.html) and this - mysql connection string with set names (http://bugs.mysql.com/bug.php?id=3727). See if this helps.

3. There is way to tell the database to use which character set... See this for details - Specifying Character Sets (http://dev.mysql.com/doc/refman/5.0/en/charset-syntax.html)... I see that there are various levels of this setting.. use the column specific one (column character set)and see if this helps. If no.. use the one with a higher level default (table, database, server levels -- sorry i dont have MySQL here.. couldn't test so you might need to do some blind trials :( ). If still doesn't help check the system variables for your server - they go by the name character_set_database, character_set_server, character_set_results etc. See if they are consistent with utf8 or not (check out the whole list on MySQL documentation).. if they are not set them up to utf8..See if this helps ..

4. If none of the above help.. go to the MySQL forum ... the experts there might be able to help you... but I think this should be enough to get your issues sorted out..

All the best... did a lot of research about this... need to relax now.. Regards.