Skip to content

Instantly share code, notes, and snippets.

@neverything
Created December 12, 2018 09:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neverything/946c52e11b86383d7bcb33e2519beced to your computer and use it in GitHub Desktop.
Save neverything/946c52e11b86383d7bcb33e2519beced to your computer and use it in GitHub Desktop.
With these commands you can search and replace encoding issues. Additional chars can be found here https://www.i18nqa.com/debug/utf8-debug.html
UPDATE wp_posts SET post_content = REPLACE(post_content, unhex('C383C2A0'), 'à') WHERE post_type='post';
UPDATE wp_posts SET post_title = REPLACE(post_title, unhex('C383C2A0'), 'à') WHERE post_type='post';
wp search-replace "ä" "ä"
wp search-replace "ü" "ü"
wp search-replace "ö" "ö"
wp search-replace "î" "î"
wp search-replace "é" "é"
wp search-replace "ê" "ê"
wp search-replace "è" "è"
wp search-replace "ù" "ù"
wp search-replace "ç" "ç"
wp search-replace "ô" "ô"
wp search-replace "„" "„"
wp search-replace "â" "â"
wp search-replace "’" "’"
wp search-replace "Ä" "Ä"
wp search-replace "‘" "‘"
wp search-replace "’" "’"
wp search-replace "ò" "ò"
wp search-replace "Ãœ" "Ü"
wp search-replace "–" "–"
wp search-replace "‚" "‚"
wp search-replace "“" "“"
wp search-replace "û" "û"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment