Gossamer Forum
Home : General : Databases and SQL :

Sort problem for international category names in MySQL using ORDER BY

Quote Reply
Sort problem for international category names in MySQL using ORDER BY
I started a thread in Links SQL: Discussions, with similar subject:
"MySQL problem using ORDER BY for international category names"
I renamed because it may describe better my problem.

Please check here:
http://www.gossamer-threads.com/...orum.cgi?post=192124

Example category names:
Vision, Files, Computers, Überalles, Accessories.

Sorting category names above will result following order:
Accessories, Computers, Files, Vision, Überalles.
(Of course Überalles should be before Vision, so sorting is bad)

I checked MySQL docs, and found that there is only possible to change character set if you restart MySQL server.

Alex, don't you think, that would be better to change MySQL based ordering to Perl based ordering?
Or at least to make Perl based ordering optional?

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Sort problem for international category names in MySQL using ORDER BY In reply to
Alex, please check this thread.
It's about important LSQL & MySQL international character sorting problem.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Sort problem for international category names in MySQL using ORDER BY In reply to
Hi,

Perl based sorting is not practical for large amount of resutls, and would dramatically affect the performance of the system. It also prevents complex sorting that you can do quite easily (i.e. Priority DESC, Title ASC). I really think the best solution here is to startup MySQL with the proper charset encoding.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Sort problem for international category names in MySQL using ORDER BY In reply to
Hi Alex,

I understand your point, about performance.
But this still not solves the problem of multiple languages.

Quote:
I really think the best solution here is to startup MySQL with the proper charset encoding.
Nope. If you want to use multiple template sets for multiple languages, and you need sortings for several language locale, then it is not possible, while we use MySQL sorting. Frown
At least we should wait until MySQL v4.2 (this feature is in todo of 4.2), but when will 4.2 released?

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Sort problem for international category names in MySQL using ORDER BY In reply to
Use postgres?

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Sort problem for international category names in MySQL using ORDER BY In reply to
Fair suggestion.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...