[TYPO3] Unicode (UTF-8) and SQL question(s)

Daniel Pötzinger operation-lan at gmx.de
Thu Feb 16 10:57:30 CET 2006

Jack Hansen wrote:
> Hi,
> I need to change my web page a little as I have 3 different languages on and
> one of them is Latvian, which contains many non English characters.
> Especially the title bar looks nasty as all the special characters are
> displayed as e.g Īrija instead of the real word for Ireland in Latvian.
> I figured out, that I need to force Typo3 to use UTF-8 and I also need to
> change my SQL database to use UFT8_unicode_ci.
> Do I need to change every single collation from whatever it is today to
> UFT8_unicode_ci or just those where special characters will appear?
At first: collation is for sorting this setting depends on the charset. 
Important is the charset.

As Irina already said, TYPO3 shoul work with LATIN1 database and 
force-charset set to uft-8 , cause typo3 converts and interprets all as 
utf-8. But it is not the best way, since non LATIN1 data in the database 
are represented with multibytes (means you cannot edit with phpmyadmin 
etc..) Also there may be problems in converting multibytechars to 

I just know the hard way to have a fully utf-8 database:

  1.) dump data / make sure the dumpfile is utf-8 encoded
(if not type "recode LATIN1..UTF8 <dumpfile>")

  2.) search and replace the Charset of the create-table syntax in utf8
  (replace "latin1" with "utf8")

3.) drop the old typo3 database
4.) create new database: create database typo3 default character set utf8

5.) insert dumpfile

6.) mysql's charset should be utf8 too, therefore I think exist and 
compileoption but this is also possible:

  edit file /etc/my.cnf

7.)Set in TYPO3-Installtool: [BE][forceCharset] = utf-8

8.) restart mysqld.
It depends also on compileoptions but You can modify startcommand with 
(mysqld_safe --default-character-set=utf8 <..other options..>)

9) Check mysql varibles with "show variables;" in mysql commandline. 
Also you can check if charset was correctly detected as utf8 in the browser

Other problems:
10) If you use TV it is neccessary to recode the templates to utf-8 too 
(and remap afterwards)
11) indexed_serach index seems not to work; so clear all index tables
12) as I know there are errors if someone trys to insert non-utf8 
characters in the database. So maybe there are extensions with trouble 
on that.


> Specs:
> Typo3 3.8
> TV 0.4.0
> MySQL 4.1
> Any tip appreciated
> Jack 

More information about the TYPO3-english mailing list