[TYPO3-dev] how to set the charset correctly to UTF-8

Franz Holzinger franz at ttproducts.de
Thu Jan 5 13:52:39 CET 2012


Hello Stefan,

On 04/01/12 21:10, Stefan Neufeind wrote:
>> All characters are shown correctly with phpMyAdmin. The database, the
>> tables and the tables fields are all set to 'utf8_general_ci'.
>> php.ini:
>> default_charset = "utf-8"
>>
>> TYPO3 4.6.3
>> PHP 5.3.2
>> mysql  Ver 14.14 Distrib 5.1.41
>
> [...]
> after successful conversion don't set forceCharset or setDBinit at all
> (remove/comment that line from the config). Leaving it as an empty
> string will prevent TYPO3 from performing its initialisation needed.
>
> Install "sm_charsethelper" to confirm using the "Reports"-section that
> your connection to the DB correctly uses UTF-8. And be sure to clear the
> cache for up-to-date results in the frontend.
>
This site has been new and started with UTF-8. The database has never 
been in latin1 charset before.

I get this result in Reports of the extension "sm_charsethelper":

MySQL Collation
collation_connection  latin1_swedish_ci
collation_database    utf8_general_ci
collation_server      latin1_swedish_ci

> In case you can use a console maybe consider writing back your 4.4.x-db
> (latin1), do all upgrade-steps in the installer, use the script below to
> convert and remove both settings mentioned above from localconf.php.
I have checked the file localconf.php. There have been entries like 
this: I did not run your script.

$TYPO3_CONF_VARS['SYS']['setDBinit'] = '';
$TYPO3_CONF_VARS['BE']['forceCharset'] = '';

This has been inserted automatically by the Install Tool. When I remove 
it: So there is a bug in the Install Tool.

the characters are shown correctly in the Backend!

Thanks.

Franz







More information about the TYPO3-dev mailing list