[TYPO3] UTF8 in MySQL Database with a MySQL client in latin1

Dominique Feyer dominique.feyer at reelpeek.net
Mon Aug 18 00:32:21 CEST 2008


Hi everybody, here's my summer trouble, if somebody can help me ... i  
can send some free beer ;-)

I have a TYPO3 installation setup in UTF-8, like that:

$TYPO3_CONF_VARS['SYS']['t3lib_cs_convMethod'] = 'iconv';
$TYPO3_CONF_VARS['SYS']['t3lib_cs_utils'] = 'iconv';
$TYPO3_CONF_VARS['BE']['forceCharset'] = 'utf-8';

Is the TS template

config.renderCharset = utf-8

But i forgot to set in localconf.php the line:

$TYPO3_CONF_VARS['SYS']['setDBinit'] = 'SET NAMES utf8;';

If I add this line, the frontend (templavoila) loose the template  
configuration, and in the backend all the accentuated characters as  
trouble.

So my MySQL client is always in latin1 (I check the configuration of  
mysql with SHOW VARIABLES, and it's the case)

Everything work nice in the TYPO3 backend and frontend, but if I  
insert data in the TYPO3 database with phpmyadmin or an other mysql  
client correctly configured in UTF8, the output in TYPO3 is not good

When i browse my database in PHPMyAdmin, i can't see the accentuated  
characters correctly except if I edit this record with phpmyadmin.  
But in this case TYPO as some trouble with the accentuated characters.

If I understand well the problem, TYPO3 send UTF8 data, but the MySQL  
client translate it lik if the data was in latin1 to UTF8 (the  
database use utf8_general_ci as collation). finaly my data are not in  
UTF8 nor in latin1 ...

So my 2 cents question, is how can I translate/convert this DB to  
have a standard UTF-8 configuration.

I have a lots of data inside the database so a manual edition is not  
possible

Thanks a lots for your help

Dominique Feyer

  
  


More information about the TYPO3-english mailing list