[TYPO3] UTF FE/BE with LatinX DB migration problems [SOLVED]
Amiran Chyb
amiran.chyb at stopspam.gmail.com
Wed Feb 7 17:20:05 CET 2007
ok, I've figured it out.
with utf FE/BE and LatinX DB, database gets utf8 encoded strings but
treats them as if they were latinX.
So there are two things to remember:
when dumping such db one should use
"mysqldump --compatible=mysql323 ..."
(probably 4.0 compatibility will do as well) since it prevents mysql from
converting the dump from defined charset (in DEFAULT CHARSET in
table/columns definitions) to unicode. Since our db data is already in
unicode, converting it latin->utf would break it by double encoding.
to insert the dump (with 1 table data eg.) to existing typo3 db one should
have the dump in FE/BE charset (utf8 usually) and inject it to mysql by
letting it think that it's latinX (just as in normal FE->DB roundtrip).
So:
mysql db -u.. -p.. --default-character-set=latin2 < utfdump.sql
of course converting db to utf is also a possibility, but it may break too
much (in my case there were "no template found" errors which suggest that
Typo couldn't recognize some of its own records) since it requires hacking
the source (adding "set names utf8" to setSbInit in install tool broke my
installation completely, although adding it instead to t3lib_db.php worked
- in theory it should be the same).
cheers
Am
More information about the TYPO3-english
mailing list