Grouping by initial letter
Hi,
I have a database/table utf8_unicode_ci. The contents is in german, but I will have several installations of the app with different collations (french, russian as a start). In german the letter å, ä, ö and ü exists but are treated by the collation as a, a, o and u respectively, they're just a "normal" letter with a twist. This is all fine and dandy.
Österreich, Oman, Schweden, Ägypten, Argentinien
becomes:
Ägypten, Argentinien, Oman, Österreich, Schweden
Here the problem; I want in my front end group the data by initial letters, and a DISTINCT(LEFT(name, 1)) should give me good data, but in the special case above, I get "Ä", "O", "S" and not "A", "O", "S".
So, is there any way the fetch the data from a collation point of view, and not data point of view?
And since I want this general for many collation I can't (easily) handle this in the code in my app.
Thanks
/Glenn
PS: I'm using MySQL v5.0.45.
Edited 1 time(s). Last edit at 08/15/2007 05:41AM by Glenn Nilsson.