[TYPO3-english] How can I convert my database to utf8?

Jörg Klein joerg at klein-family.com
Thu Jun 3 03:26:14 CEST 2010


Hi Jigal,

"Jigal van Hemert" <jigal at xs4all.nl> schrieb im Newsbeitrag 
news:mailman.1.1275507441.23622.typo3-english at lists.typo3.org...
> Jörg Klein wrote:
>> What I want:
>> I want to set $TYPO3_CONF_VARS['BE']['forceCharset'] = utf-8;
>> According to the description in the Install Tool the database will then 
>> always use utf-8 as charset.
>> So I must(?) convert the DB to utf-8.
>
> - the script was meant for the situation where utf-8 encoded data was 
> stored in latin-1 (or other charsets) tables. This was very common then. 
> You can recognize this by looking in PHPmyAdmin and you find that 
> characters with accents (diacriticals) are shown as weird double-character 
> combinations:
> instead of "Ali Gökgöz and Gültekin Tarcan" it shows as "Ali Gökgöz and 
> Gültekin Tarcan".
> If this is *not* the case in your situation, turn lines 97 - 107 into 
> comments by putting // in front of them.

Umlauts are displayed correctly before converting, so I commented these 
lines.

> - it really doesn't matter if there are columns/tables already in utf-8 
> format

> Furthermore, if you use the following settings in the Install Tool you 
> should have a UTF-8 installation:
>
> $TYPO3_CONF_VARS['SYS']['setDBinit'] = 'SET NAMES utf8;';
> $TYPO3_CONF_VARS['BE']['forceCharset'] = 'utf-8';

I just tried that and it works! Thank you so much!

I just tried to understand what exactly your code does:


> Have a good one!

I had, thank you!

Jörg 




More information about the TYPO3-english mailing list