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

Jörg Klein joerg at klein-family.com
Wed Jun 2 17:40:38 CEST 2010


Hello Kay,

"Kay Strobach" <typo3 at kay-strobach.de> schrieb im Newsbeitrag 
news:mailman.1.1275460712.23787.typo3-english at lists.typo3.org...
>
> there is a small trick, that helped me out:
> Drop the database after you dumped it.
>
> mysqldump -u -p DB > dump.sql
>
> Recreate it with Kollation utf8_general_ci (e.g. with PHPMYadmin at the
> startingpage ;) - The charset is very important ...

I did that now.
(Does this change anything for the tables or columns? They all have their 
own charset/collation setting.)
Then I used iconv -f CP1252 -t utf8 on the dump.

> Perhaps you need to change the collation in the dump (depends on
> version) manually to utf8_general_ci ...

Without replacing the charset and collation settings:
Special chars are OK when displayed in TYPO3.
But they are broken in PHPMyAdmin:
E.g. instead of ü I get Ã?.
And PHPMyAdmin displays that charset and collation are still latin1.

Replacing the charset and collations:
Special chars are OK when displayed in TYPO3.
But they are broken in PHPMyAdmin:
E.g. instead of ü I get Ã?.
PHPMyAdmin displays that charset and collation are utf8.

What to do now?
Since it works in TYPO3, do I have to set something else in PHPMyAdmin?
Or is it just luck that it works in TYPO3 and the signs in my DB now _are_ 
garbled?

Jörg
 




More information about the TYPO3-english mailing list