sasha85
asked on
UTF8 Order By
utf8 is universal encoding...but HOW CAN I ORDER BY it to diffrent languages alphabetic order?
every 2 utf8 chars is a letter in russia\hebrew\arabic...
when i do Order by left(location,2)"
i got order of letters but not alfabetic...
what can i do?
every 2 utf8 chars is a letter in russia\hebrew\arabic...
when i do Order by left(location,2)"
i got order of letters but not alfabetic...
what can i do?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I did find something here that might help you. It has a few paragraphs on sorting that I don't fully understand myself, but perhaps you will ...
http://dev.mysql.com/tech-resources/articles/4.1/unicode.html
http://dev.mysql.com/tech-resources/articles/4.1/unicode.html
And here's another one that written for php/mysql, but maybe you can find something helpful ...
http://www.onphp5.com/article/6
http://www.onphp5.com/article/6
And one more that looks pretty negative on finding an easy solution ...
http://support.microsoft.com/kb/232580
http://support.microsoft.com/kb/232580
ASKER
i read all...i realy hope i will find something else...cause i don't want to open special tables only for sorting..
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
do you know where i can find it in MYSQL Administrator?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
you mean "COLLATE"?
ASKER
cause if yoy do, i tried to set the hebrew version first:
i tested:
utf8_swedish_ci
utf8_general_ci
i have to say that this changes the order but again not to the right alphabetic hebrew order
i tested:
utf8_swedish_ci
utf8_general_ci
i have to say that this changes the order but again not to the right alphabetic hebrew order
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
you mean
mysql="SELECT X FROM T ORDER BY X COLLATE hebrew_general_ci"
?
mysql="SELECT X FROM T ORDER BY X COLLATE hebrew_general_ci"
?
ASKER
cause that gives:
icrosoft OLE DB Provider for ODBC Drivers error '80040e31'
[MySQL][ODBC 3.51 Driver][mysqld-4.1.21-comm unity-nt]C OLLATION 'hebrew_general_ci' is not valid for CHARACTER SET 'utf8'
icrosoft OLE DB Provider for ODBC Drivers error '80040e31'
[MySQL][ODBC 3.51 Driver][mysqld-4.1.21-comm
ASKER
and if i use other collates this still wrong as like from the mysql administrator...
is there an option to sort only by first letter and provide the list of letters inside the query?
is there an option to sort only by first letter and provide the list of letters inside the query?
ASKER
cause every uneveral languges sites uses utf8...i hope they are not working like that...
and i am using asp