Skip to content

Instantly share code, notes, and snippets.

@SuN-80
Created February 20, 2018 12:53
Show Gist options
  • Save SuN-80/05d3ccb49d55034f06794c5550ac4524 to your computer and use it in GitHub Desktop.
Save SuN-80/05d3ccb49d55034f06794c5550ac4524 to your computer and use it in GitHub Desktop.
Fix double-encoded UTF8 characters
-- In an utf-8 table
UPDATE mytable SET
field = CONVERT(CAST(CONVERT(field USING latin1) AS BINARY) USING utf8);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment