Skip to content

Instantly share code, notes, and snippets.

@jeffrydegrande
Created January 5, 2012 15:14
Show Gist options
  • Save jeffrydegrande/1565665 to your computer and use it in GitHub Desktop.
Save jeffrydegrande/1565665 to your computer and use it in GitHub Desktop.
fix data in mysql that has been encoded to utf8 twice
mysqldump -p --opt --quote-names --skip-set-charset --default-character-set=LATIN1 DATABASE > sql.dump
cat sql.dump | mysql -p --default-character-set=utf8 DATABASE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment