[TYPO3-english] UTF-8 wiki - setDBinit

Jigal van Hemert jigal at xs4all.nl
Sun May 3 00:08:16 CEST 2009


Hi David,

> I'm using
> $TYPO3_CONF_VARS['SYS']['setDBinit'] = 'SET NAMES utf8'.chr(10).'SET
> character_set_connection = utf8';

The second statement is not necessary. Read the MySQL documentation, e.g.
at http://dev.mysql.com/doc/refman/5.1/en/set-option.html

"SET NAMES sets the three session system variables character_set_client,
character_set_connection, and character_set_results to the given character
set."

It's quite handy to set the default character set and collation for the
database before you setup TYPO3, but other than that you only need to set
SYS|setDBinit and BE|forceCharset correctly.

Regarding step 2 of your tutorial: TYPO3 core handles character sets
correctly. Extensions should use the appropriate TYPO3 API functions to
eliminate character set problems.

Step 3: It's enough to set the default character set and collation of the
database itself when setting up the database.

Regards,

-- 
Jigal van Hemert.



More information about the TYPO3-english mailing list