[TYPO3-english] UTF-8 wiki - setDBinit
Jigal van Hemert
jigal at xs4all.nl
Fri May 1 11:31:29 CEST 2009
> I once expirienced that
> SET NAMES utf8;
> SET CHARACTER SET utf8;
> was not enough. It didn't work with these settings and I spent hours
> finding out why. Finally I found those 5 lines which worked OK so I use
> them since.
In some cases those two lines can be too much. If your default database
collation is not one of the utf-8 kinds the second statement will use that
The following three settings are enough:
- tables and fields in db utf8 character set (and I prefer utf8-general-ci
- SET NAMES utf8;
- BE forceCharset: utf-8
In case the database tables/fields are latin1 (or any other non-utf8
charset) and there is utf-8 data stored in these tables (you'll see the
well known multi-byte combinations for accented characters in e.g.
phpMyAdmin) I use a small script
(http://www.xs4all.nl/~dcbjht/typo3/db_utf8_fix.zip) to "convert" the
Jigal van Hemert.
More information about the TYPO3-english