我有一个数据库,其中有很多损坏的条目,例如:
IVAM BENEDITO GONÃALVES DE QUEIROZ
我已经尝试了几次编码转换无济于事。我发现了其他报告,其中字符 Ã 应该是 Ã。但是,在这种情况下,Ã 应该是 Ç。
有没有人知道如何成功转换它?目前,我正在查找有问题的字符并用REPLACE((替换。
不确定具体问题,但这些替换修复了数据:
UPDATE Brazil SET name = REPLACE( name, 'Ã','ç' ) WHERE name LIKE '%Ã%';
UPDATE Brazil SET name = REPLACE( name, 'À','A ' ) WHERE name LIKE '%À%';
UPDATE Brazil SET name = REPLACE( name, '©','ú' ) WHERE name LIKE '%©%';
UPDATE Brazil SET name = REPLACE( name, 'Á','A' ) WHERE name LIKE '%Á%';
UPDATE Brazil SET name = REPLACE( name, 'Â','A' ) WHERE name LIKE '%Â%';
UPDATE Brazil SET name = REPLACE( name, 'é','A' ) WHERE name LIKE '%é%';
UPDATE Brazil SET name = REPLACE( name, '±','é' ) WHERE name LIKE '%±%';
UPDATE Brazil SET name = REPLACE( name, 'ú','ú' ) WHERE name LIKE '%ú%';
UPDATE Brazil SET name = REPLACE( name, 'º','í' ) WHERE name LIKE '%º%';
UPDATE Brazil SET name = REPLACE( name, '³','ú' ) WHERE name LIKE '%³%';
UPDATE Brazil SET name = REPLACE( name, 'ô','é' ) WHERE name LIKE '%ô%';
UPDATE Brazil SET name = REPLACE( name, 'ö','ê' ) WHERE name LIKE '%ö%';
UPDATE Brazil SET name = REPLACE( name, 'Ç','ç' ) WHERE name LIKE '%Ç%';
UPDATE Brazil SET name = REPLACE( name, '¤','á' ) WHERE name LIKE '%¤%';
UPDATE Brazil SET name = REPLACE( name, 'Z¡','á' ) WHERE name LIKE '%Z¡%';
UPDATE Brazil SET name = REPLACE( name, '¡','ó' ) WHERE name LIKE '%¡%';
UPDATE Brazil SET name = REPLACE( name, 'ý','ç' ) WHERE name LIKE '%ý%';
UPDATE Brazil SET name = REPLACE( name, '┼','é' ) WHERE name LIKE '%┼%';
UPDATE Brazil SET name = REPLACE( name, '¾','á' ) WHERE name LIKE '%¾%';
UPDATE Brazil SET name = REPLACE( name, 'Ø','ã' ) WHERE name LIKE '%Ø%';
UPDATE Brazil SET name = REPLACE( name, 'Ø','ã' ) WHERE name LIKE '%Ø%';
UPDATE Brazil SET name = REPLACE( name, 'É','é' ) WHERE name LIKE '%É%';
UPDATE Brazil SET name = REPLACE( name, 'Ç','ç' ) WHERE name LIKE '%Ç%';
UPDATE Brazil SET name = REPLACE( name, 'â•”','é' ) WHERE name LIKE '%â•”%';
UPDATE Brazil SET name = REPLACE( name, 'Õ','ú' ) WHERE name LIKE '%Õ%';
UPDATE Brazil SET name = REPLACE( name, 'â•','í' ) WHERE name LIKE '%â•%';
UPDATE Brazil SET name = REPLACE( name, '¶','ã' ), name = REPLACE( name, 'µ','á' ), name = REPLACE( name, 'Â','' ) WHERE name LIKE '%ÂÂ%';
UPDATE Brazil SET name = REPLACE( name, 'µ','ñ' ) WHERE name LIKE '%µ%';
UPDATE Brazil SET name = REPLACE( name, 'Ãœ','ü' ) WHERE name LIKE '%Ãœ%';
UPDATE Brazil SET name = REPLACE( name, '├','ã' ) WHERE name LIKE '%├%';
UPDATE Brazil SET name = REPLACE( name, 'ë','ã' ) WHERE name LIKE '%ë%';
UPDATE Brazil SET name = REPLACE( name, 'Ô','õ' ) WHERE name LIKE '%Ô%';
UPDATE Brazil SET name = REPLACE( name, '¨','ã' ) WHERE name LIKE '%¨%';
UPDATE Brazil SET name = REPLACE( name, 'ÃŒ','â' ) WHERE name LIKE '%ÃŒ%';
UPDATE Brazil SET name = REPLACE( name, '°','é' ) WHERE name LIKE '%°%';
UPDATE Brazil SET name = REPLACE( name, 'æ','í' ) WHERE name LIKE '%æ%';
UPDATE Brazil SET name = REPLACE( name, 'Â¥','ú' ) WHERE name LIKE '%Â¥%';
UPDATE Brazil SET name = REPLACE( name, '¿','ó' ) WHERE name LIKE '%¿%';
UPDATE Brazil SET name = REPLACE( name, '×','ç' ) WHERE name LIKE '%×%';
UPDATE Brazil SET name = REPLACE( name, '┬Â','ã' ) WHERE name LIKE '%┬Â%';
UPDATE Brazil SET name = REPLACE( name, 'Â','â' ) WHERE name LIKE '%Â%';
UPDATE Brazil SET name = REPLACE( name, 'ãâ','ã' ) WHERE name LIKE '%ãâ%';
UPDATE Brazil SET name = REPLACE( name, 'Z£','ã' ) WHERE name LIKE '%Z£%';
UPDATE Brazil SET name = REPLACE( name, '£','ú' ) WHERE name LIKE '%£%';
UPDATE Brazil SET name = REPLACE( name, 'Z¢','ã' ) WHERE name LIKE '%Z¢%';
UPDATE Brazil SET name = REPLACE( name, 'ã│','ó' ) WHERE name LIKE '%ã│%';
UPDATE Brazil SET name = REPLACE( name, 'ã¢','ç' ) WHERE name LIKE '%ã¢%';
UPDATE Brazil SET name = REPLACE( name, 'á┢','ç' ) WHERE name LIKE '%á┢%';
UPDATE Brazil SET name = REPLACE( name, '┬│','a ' ) WHERE name LIKE '%┬│%';
UPDATE Brazil SET name = REPLACE( name, 'ç£','í' ) WHERE name LIKE '%ç£%';
UPDATE Brazil SET name = REPLACE( name, '¶','õ' ) WHERE name LIKE '%¶%';
UPDATE Brazil SET name = REPLACE( name, '§','ú' ) WHERE name LIKE '%§%';
UPDATE Brazil SET name = REPLACE( name, '¾','ó' ) WHERE name LIKE '%¾%';
UPDATE Brazil SET name = REPLACE( name, 'Ã','ç' ) WHERE name LIKE '%Ã%';