Link to home
Start Free TrialLog in
Avatar of sasha85
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?
SOLUTION
Avatar of Cornelia Yoder
Cornelia Yoder
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sasha85
sasha85

ASKER

oo my god...i realy hope there is better ways...
cause every uneveral languges sites uses utf8...i hope they are not working like that...
and i am using asp
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
And here's another one that written for php/mysql, but maybe you can find something helpful ...

http://www.onphp5.com/article/6
And one more that looks pretty negative on finding an easy solution ...

http://support.microsoft.com/kb/232580
Avatar of sasha85

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
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sasha85

ASKER

do you know where i can find it in MYSQL Administrator?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sasha85

ASKER

you mean "COLLATE"?
Avatar of sasha85

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
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sasha85

ASKER

you mean
mysql="SELECT X FROM T ORDER BY X COLLATE hebrew_general_ci"
?
Avatar of sasha85

ASKER

cause that gives:
 icrosoft OLE DB Provider for ODBC Drivers error '80040e31'

[MySQL][ODBC 3.51 Driver][mysqld-4.1.21-community-nt]COLLATION 'hebrew_general_ci' is not valid for CHARACTER SET 'utf8'
Avatar of sasha85

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?