Strange characters after importing a MySQL dump

I recently imported a mysql dump of my wikkawiki to this server and somehow strange characters appeared in my generated pages, for instance got replaced by €

To solve this problem, run underneath script on all tables / fields affected.

UPDATE `table` SET `field`=REPLACE(`field`,''á'',''á'');
UPDATE `table` SET `field`=REPLACE(`field`,''ä'',''ä'');
UPDATE `table` SET `field`=REPLACE(`field`,''â'',''â'');
UPDATE `table` SET `field`=REPLACE(`field`,''é'',''é'');
UPDATE `table` SET `field`=REPLACE(`field`,''è'',''è'');
UPDATE `table` SET `field`=REPLACE(`field`,''ê'',''ê'');
UPDATE `table` SET `field`=REPLACE(`field`,''ë'',''ë'');
UPDATE `table` SET `field`=REPLACE(`field`,''ì'',''ì'');
UPDATE `table` SET `field`=REPLACE(`field`,''í'',''í'');
UPDATE `table` SET `field`=REPLACE(`field`,''î'',''î'');
UPDATE `table` SET `field`=REPLACE(`field`,''ïo'',''ï'');
UPDATE `table` SET `field`=REPLACE(`field`,''ò'',''o'');
UPDATE `table` SET `field`=REPLACE(`field`,''ó'',''ò'');
UPDATE `table` SET `field`=REPLACE(`field`,''ô'',''ó'');
UPDATE `table` SET `field`=REPLACE(`field`,''ö'',''ô'');
UPDATE `table` SET `field`=REPLACE(`field`,''ù'',''ö'');
UPDATE `table` SET `field`=REPLACE(`field`,''ú'',''ù'');
UPDATE `table` SET `field`=REPLACE(`field`,''ü'',''ú'');
UPDATE `table` SET `field`=REPLACE(`field`,''û'',''ü'');
UPDATE `table` SET `field`=REPLACE(`field`,''€'',''û'');
UPDATE `table` SET `field`=REPLACE(`field`,''Ã'',''à'');
UPDATE `table` SET `field`=REPLACE(`field`,''€'',''€'');

Leave a Comment