When the data has been double-encoded, you will still have funny looking characters in the database.
Here is how to fix it, in two simple steps, using themysqldump
andmysql
commands:
Source Database:
mysqldump -h DB_HOST -u DB_USER -p DB_PASSWORD --opt --quote-names \
--skip-set-charset --default-character-set=latin1 DB_NAME > DB_NAME-dump.sql
Target Database: mysql -h DB_HOST -u DB_USER -p DB_PASSWORD \
--default-character-set=utf8 DB_NAME < DB_NAME-dump.sql
No comments:
Post a Comment