Skip to content

Instantly share code, notes, and snippets.

@boogah
Last active December 10, 2015 22:58
Show Gist options
  • Save boogah/4505568 to your computer and use it in GitHub Desktop.
Save boogah/4505568 to your computer and use it in GitHub Desktop.
A fix for European Unicode character weirdness. Other character fixes are available here: https://gist.github.com/1379880
update wp_posts set post_content = replace(post_content,'ä','ä');
update wp_posts set post_title = replace(post_title,'ä','ä');
update wp_comments set comment_content = replace(comment_content,'ä','ä');
update wp_postmeta set meta_value = replace(meta_value,'ä','ä');
update wp_posts set post_excerpt = replace(post_excerpt,'ä','ä');
update wp_terms set name = replace(name,'ä','ä');
update wp_posts set post_content = replace(post_content,'ö','ö');
update wp_posts set post_title = replace(post_title,'ö','ö');
update wp_comments set comment_content = replace(comment_content,'ö','ö');
update wp_postmeta set meta_value = replace(meta_value,'ö','ö');
update wp_posts set post_excerpt = replace(post_excerpt,'ö','ö');
update wp_terms set name = replace(name,'ö','ö');
update wp_posts set post_content = replace(post_content,'Ã¥','å');
update wp_posts set post_title = replace(post_title,'Ã¥','å');
update wp_comments set comment_content = replace(comment_content,'Ã¥','å');
update wp_postmeta set meta_value = replace(meta_value,'Ã¥','å');
update wp_posts set post_excerpt = replace(post_excerpt,'Ã¥','å');
update wp_terms set name = replace(name,'Ã¥','å');
update wp_posts set post_content = replace(post_content,'è','è');
update wp_posts set post_title = replace(post_title,'è','è');
update wp_comments set comment_content = replace(comment_content,'è','è');
update wp_postmeta set meta_value = replace(meta_value,'è','è');
update wp_posts set post_excerpt = replace(post_excerpt,'è','è');
update wp_terms set name = replace(name,'è','è');
update wp_posts set post_content = replace(post_content,'Ç','ç');
update wp_posts set post_title = replace(post_title,'Ç','ç');
update wp_comments set comment_content = replace(comment_content,'Ç','ç');
update wp_postmeta set meta_value = replace(meta_value,'Ç','ç');
update wp_posts set post_excerpt = replace(post_excerpt,'Ç','ç');
update wp_terms set name = replace(name,'Ç','ç');
update wp_posts set post_content = replace(post_content,'é','é');
update wp_posts set post_title = replace(post_title,'é','é');
update wp_comments set comment_content = replace(comment_content,'é','é');
update wp_postmeta set meta_value = replace(meta_value,'é','é');
update wp_posts set post_excerpt = replace(post_excerpt,'é','é');
update wp_terms set name = replace(name,'é','é');
update wp_posts set post_content = replace(post_content,'ü','ü');
update wp_posts set post_title = replace(post_title,'ü','ü');
update wp_comments set comment_content = replace(comment_content,'ü','ü');
update wp_postmeta set meta_value = replace(meta_value,'ü','ü');
update wp_posts set post_excerpt = replace(post_excerpt,'ü','ü');
update wp_terms set name = replace(name,'ü','ü');
update wp_posts set post_content = replace(post_content,'ß','ß');
update wp_posts set post_title = replace(post_title,'ß','ß');
update wp_comments set comment_content = replace(comment_content,'ß','ß');
update wp_postmeta set meta_value = replace(meta_value,'ß','ß');
update wp_posts set post_excerpt = replace(post_excerpt,'ß','ß');
update wp_posts set post_content = replace(post_content,'á','á');
update wp_posts set post_title = replace(post_title,'á','á');
update wp_comments set comment_content = replace(comment_content,'á','á');
update wp_postmeta set meta_value = replace(meta_value,'á','á');
update wp_posts set post_excerpt = replace(post_excerpt,'á','á');
update wp_terms set name = replace(name,'á','á');
update wp_posts set post_content = replace(post_content,'ó','ó');
update wp_posts set post_title = replace(post_title,'ó','ó');
update wp_comments set comment_content = replace(comment_content,'ó','ó');
update wp_postmeta set meta_value = replace(meta_value,'ó','ó');
update wp_posts set post_excerpt = replace(post_excerpt,'ó','ó');
update wp_terms set name = replace(name,'ó','ó');
update wp_posts set post_content = replace(post_content,'ú','ú');
update wp_posts set post_title = replace(post_title,'ú','ú');
update wp_comments set comment_content = replace(comment_content,'ú','ú');
update wp_postmeta set meta_value = replace(meta_value,'ú','ú');
update wp_posts set post_excerpt = replace(post_excerpt,'ú','ú');
update wp_terms set name = replace(name,'ú','ú');
update wp_posts set post_content = replace(post_content,'É','É');
update wp_posts set post_title = replace(post_title,'É','É');
update wp_comments set comment_content = replace(comment_content,'É','É');
update wp_postmeta set meta_value = replace(meta_value,'É','É');
update wp_posts set post_excerpt = replace(post_excerpt,'É','É');
update wp_terms set name = replace(name,'É','É');
update wp_posts set post_content = replace(post_content,'ñ','ñ');
update wp_posts set post_title = replace(post_title,'ñ','ñ');
update wp_comments set comment_content = replace(comment_content,'ñ','ñ');
update wp_postmeta set meta_value = replace(meta_value,'ñ','ñ');
update wp_posts set post_excerpt = replace(post_excerpt,'ñ','ñ');
update wp_terms set name = replace(name,'ñ','ñ');
/* Please make sure to run these queries LAST! */
update wp_posts set post_content = replace(post_content,'Ã','í');
update wp_posts set post_title = replace(post_title,'Ã','í');
update wp_comments set comment_content = replace(comment_content,'Ã','í');
update wp_postmeta set meta_value = replace(meta_value,'Ã','í');
update wp_posts set post_excerpt = replace(post_excerpt,'Ã','í');
update wp_terms set name = replace(name,'Ã','í');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment