Skip to content

Instantly share code, notes, and snippets.

@neko-fire
Created May 10, 2012 07:42
Show Gist options
  • Save neko-fire/2651741 to your computer and use it in GitHub Desktop.
Save neko-fire/2651741 to your computer and use it in GitHub Desktop.
Typo3: UTF-8 repair
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment