[TYPO3-english] Database sorting danish characters issue
bb at bellevuevej.dk
Fri Jan 8 14:17:52 CET 2010
Jigal van Hemert skrev:
> Brian Bendtsen wrote:
>> I have discovered a generel problem in the TYPO3 frontend and backend,
>> I believe its related to charset configuration. The problem is with
>> sorting of danish characters, actually it seems to only be a problem
>> with the letter "Å", the last letter in the danish alpabet.
> Sorting (and comparing) is handled in MySQL by setting the collation
>> $TYPO3_CONF_VARS['SYS']['UTF8filesystem'] = '1';
>> $TYPO3_CONF_VARS['BE']['forceCharset'] = 'utf-8';
>> $TYPO3_CONF_VARS['SYS']['setDBinit'] = 'SET NAMES utf8'.chr(10).'SET
>> CHARACTER SET utf8';
>> (Database table collation)
> This is a very general case insensitive (ci) collation for the utf-8
> character set.
> SET CHARACTER SET utf8; sets the client character set and results
> character set to utf8, and the connection character set and connection
> collation to the database character set and collation.
> You could use
> $TYPO3_CONF_VARS['SYS']['setDBinit'] = 'SET NAMES utf8 COLLATE
> to use Danish sorting and comparing.
> If you add the SET CHARACTER SET utf8 again, the connection collation
> will be set to the database collation (which is utf8_general_ci in your
> For a multi-language site this would not be very useful. TYPO3 would
> need to support collations in queries and DBAL...
> Regards, Jigal.
Thanks for answering. I tried what you suggest, but it changes nothing.
Maybe I don't quite get it.
Are you saying that its not possible to set up a multi-language TYPO3
site and at the same time do sorting on danish characters?
I found out that if I change the field collation of a field I want to
sort on, to utf8_danish_ci, then the sorting works.
More information about the TYPO3-english