UTF-8 repair TYPO3


/ Published in: TYPO3
Save to your folder(s)

progress of converting a latin db into utf8


Copy this code and paste it in your HTML
  1. 1. mysqldump -u root -p mydatabase > dump.sql
  2. 2. cp dump.sql dump.sql.bak
  3. 3. vi dump.sql
  4. 4. :1,$:s/ DEFAULT CHARSET=latin1/ DEFAULT CHARSET=utf8/g
  5. 5. :wq
  6. 6. mysql -u root -e "DROP DATABASE mydatabase"
  7. 7. mysql -u root -e "CREATE DATABASE mydatabase CHARACTER SET utf8"
  8. 8. mysql -u root -p mydatabase < dump.sql
  9.  
  10. ## In TYPO3 installTool:
  11. [setDBinit] -> SET NAMES utf8
  12. [UTF8filesystem] -> true
  13. [forceCharset] -> utf-8
  14.  
  15. ## typoscript:
  16. page.metaCharset = utf-8
  17. page.additionalHeaders = Content-Type:text/html;charset=utf-8

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.