Getting rid of funny characters

Funny Latin characters got pasted into some of the posts, no this wasn’t an straight forward UTF-8 / Latin encoding issue.

This is how I got rid of them.

update wp_posts
set post_content = replace(post_content,’’’,'\”) ;
update wp_posts
set post_content= replace(post_content,’…’,'…’) ;
update wp_posts
set post_content= replace(post_content,’–’,'-’) ;
update wp_posts
set post_content= replace(post_content,’“’,'”‘) ;
update wp_posts
set post_content= replace(post_content,’”’,'”‘) ;
update wp_posts
set post_content= replace(post_content,’‘’,'\”) ;
update wp_posts
set post_content= replace(post_content,’•’,'-’) ;
update wp_posts
set post_content= replace(post_content,’‡’,'c’) ;
update wp_posts
set post_content= replace(post_content,’Â’,”) ;

No Responses




By submitting a comment here you grant Webstuff a perpetual license to reproduce your words and name/web site in attribution. Inappropriate comments will be removed at admin's discretion.

Follow Me on Twitter