Surprise Me!

’, Â, � etc... How to fix strange encoding characters in WP or other SQL database

2014-09-03 0 2 2,364 YouTube

Replace strange encoding characters in WP or other SQL database - utf8 vs utf-8. Below you can find examples of ready SQL queries fixing most common strange encoding characters problem: UPDATE re1le2_posts SET post_content = replace(post_content, '’', "'"); UPDATE re1le2_posts SET post_title = replace(post_title, '’', "'"); UPDATE re1le2_posts SET post_excerpt = replace(post_excerpt, '’', "'"); UPDATE re1le2_posts SET guid = replace(guid, '’', "'"); UPDATE re1le2_postmeta SET meta_value = replace(meta_value, '’', "'"); UPDATE re1le2_postmeta SET meta_value = replace(meta_value, '—', "-"); UPDATE re1le2_posts SET post_content = replace(post_content, '—', "-"); UPDATE re1le2_comments SET comment_content = replace(comment_content, '—', "-"); UPDATE re1le2_comments SET comment_content = replace(comment_content, '–', "-"); UPDATE re1le2_postmeta SET meta_value = replace(meta_value, '–', "-"); UPDATE re1le2_posts SET post_content = replace(post_content, '–', "-"); UPDATE re1le2_posts SET post_title = replace(post_title, '–', "-"); UPDATE re1le2_options SET option_value = replace(option_value, 'Â', ""); UPDATE re1le2_postmeta SET meta_value = replace(meta_value, 'Â', ""); UPDATE re1le2_posts SET post_content = replace(post_content, 'Â', ""); UPDATE re1le2_posts SET post_title = replace(post_title, 'Â', "");