Return to Snippet

Revision: 12230
at March 6, 2009 21:30 by jdbartlett

Initial Code
UPDATE table SET column=CONVERT(CONVERT(CONVERT(column USING latin1) USING binary) using utf8);

Initial URL

Initial Description
When you forget to "SET NAMES utf8", you'll probably end up with a bunch of latin1 data in your utf8 column. This query fixes that, CONVERTing the existing data to its correct collation.

Initial Title
Correcting wrong character encoding in MySQL data

Initial Tags
mysql, convert

Initial Language