[TYPO3-dev] UTF-8 and correct sorting for German umlauts

Rocco Di Leo rocco.dileo at gmail.com
Sun Sep 3 11:58:32 CEST 2006


Hi,

there seems to be a problem in the proper data type definition in your
table.
Use the following two commands on your table and the sorting will work
(MySQL 4.1 or greater):

ALTER TABLE table_name MODIFY column_name BINARY(255);

ALTER TABLE table_name MODIFY column_name VARCHAR(255) CHARACTER SET utf8;

mysql> SELECT * FROM table_name order by column_name;

+------------+
| column_name   |
+------------+
| Osterinsel |
| Österreich |
| Portugal   |
+------------+
3 rows in set (0.00 sec)

greets
Rocco


On 9/3/06, Steffen Kamper <steffen at dislabs.de> wrote:
>
> Hi,
>
> I searched a lot about this problem and there seems not to be a solution,
> it's a 'bug' from mysql.
> As a workaround i did a string substitution in SQL but this is a weird
> solution - tried with any conversion to latin etc. with no result.
>
> vg  Steffen
>
> "Peter Russ" <peter.russ at 4many.net> schrieb im Newsbeitrag
> news:mailman.1.1156867446.29585.typo3-dev at lists.netfielders.de...
> > Martin Kutschker schrieb:
> >> Peter Russ schrieb:
> >>> Trying to get correct sorted list out of static_countries UTF-8 coded
> >>> for German either delivers Umlaut at the beginning, in between or at
> the
> >>> end of the list but never at the right place, depending on the collate
> >>> setting utf8_general_ci, utf8_unicode_ci or utf8_bin.
> >>
> >> What is correct in your opinion?
> >>
> >> See http://de.wikipedia.org/wiki/Alphabetische_Sortierung for the
> >> options.
> >>
> >> Masi
> >
> >
> > None of this options meets the result you get with Mysql :-(
> > I would expect to get Österreich listed at:
> > .
> > Osterinsel
> > Österreich
> > Portugal
> > .
> >
> > but Mysql delivers, depending on collate either
> > .
> > Afganistan
> > Österreich
> > Alabanien
> > .
> >
> > or
> > .
> > Zululand
> > Österreich
> > .
> >
> > or
> > Österreich
> > Äthiopien
> > Afganistan
> > .
> >
> > Any idea?
> >
> > Regs. Peter.
> >
> >
> > --
> > Fiat lux!
> > Docendo discimus.
> > _____________________________
> > 4Many(r) Services
> > openBC: http://www.openbc.com/go/invuid/Peter_Russ
>
>
>
>
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev
>
>




More information about the TYPO3-dev mailing list