Skip to content

Instantly share code, notes, and snippets.

@azhtom
Created May 26, 2015 18:18
Show Gist options
  • Save azhtom/60d217ef60677dc4b1bc to your computer and use it in GitHub Desktop.
Save azhtom/60d217ef60677dc4b1bc to your computer and use it in GitHub Desktop.
Unicode to UTF-8 in MySQL
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00c0','À');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00c1','Á');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00c2','Â');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00c3','Ã');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00c4','Ä');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00c5','Å');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00c6','Æ');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00c7','Ç');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00c8','È');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00c9','É');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00ca','Ê');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00cb','Ë');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00cc','Ì');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00cd','Í');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00ce','Î');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00cf','Ï');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00d1','Ñ');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00d2','Ò');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00d3','Ó');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00d4','Ô');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00d5','Õ');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00d6','Ö');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00d8','Ø');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00d9','Ù');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00da','Ú');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00db','Û');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00dc','Ü');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00dd','Ý');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00df','ß');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00e0','à');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00e1','á');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00e2','â');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00e3','ã');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00e4','ä');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00e5','å');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00e6','æ');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00e7','ç');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00e8','è');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00e9','é');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00ea','ê');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00eb','ë');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00ec','ì');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00ed','í');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00ee','î');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00ef','ï');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00f0','ð');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00f1','ñ');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00f2','ò');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00f3','ó');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00f4','ô');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00f5','õ');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00f6','ö');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00f8','ø');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00f9','ù');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00fa','ú');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00fb','û');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00fc','ü');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00fd','ý');
UPDATE `table_name` SET `column_name` = REPLACE(`column_name` ,'\\u00ff','ÿ');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment