/ Published in: TYPO3
progress of converting a latin db into utf8
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
1. mysqldump -u root -p mydatabase > dump.sql 2. cp dump.sql dump.sql.bak 3. vi dump.sql 4. :1,$:s/ DEFAULT CHARSET=latin1/ DEFAULT CHARSET=utf8/g 5. :wq 6. mysql -u root -e "DROP DATABASE mydatabase" 7. mysql -u root -e "CREATE DATABASE mydatabase CHARACTER SET utf8" 8. mysql -u root -p mydatabase < dump.sql ## In TYPO3 installTool: [setDBinit] -> SET NAMES utf8 [UTF8filesystem] -> true [forceCharset] -> utf-8 ## typoscript: page.metaCharset = utf-8 page.additionalHeaders = Content-Type:text/html;charset=utf-8