Created
May 20, 2015 17:55
-
-
Save azhtom/434c463c9b5f4653dce9 to your computer and use it in GitHub Desktop.
Fix UTF-8 broken characters in MySQL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'á','á'); | |
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'ä','ä'); | |
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'é','é'); | |
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'í©','é'); | |
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'ó','ó'); | |
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'íº','ú'); | |
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'ú','ú'); | |
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'ñ','ñ'); | |
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'í‘','Ñ'); | |
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'Ã','í'); | |
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'–','–'); | |
UPDATE `table_name` SET `column_name` = REPLACE(`column_name`,'’','\''); | |
UPDATE `table_name` SET `column_name` = REPLACE(`column_name`,'…','...'); | |
UPDATE `table_name` SET `column_name` = REPLACE(`column_name`,'–','-'); | |
UPDATE `table_name` SET `column_name` = REPLACE(`column_name`,'“','"'); | |
UPDATE `table_name` SET `column_name` = REPLACE(`column_name`,'â€','"'); | |
UPDATE `table_name` SET `column_name` = REPLACE(`column_name`,'‘','\''); | |
UPDATE `table_name` SET `column_name` = REPLACE(`column_name`,'•','-'); | |
UPDATE `table_name` SET `column_name` = REPLACE(`column_name`,'‡','c'); | |
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'Â',''); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment