UTF-8 WordPress Encoding Issue (Editor Issue)
-
We have a WordPress website which is suddenly displaying text and links that look like this:
Recommended Hair Color: L’Oréal Paris Feria Permanent Hair Color, Copper Crave
It should look like this:
Recommended Hair Color: L’Oréal Paris Feria Permanent Hair Color, Copper Crave
If you look at that line of text in the WP visual and text editors, you do not see the odd characters.
If I comment out the db_charset and db_collate lines in wp-config.php, the problem goes away:
//define(‘DB_CHARSET’, ‘utf8’);
//define(‘DB_COLLATE’, ”);Or, if I keep both lines and change utf8 to latin1, the problem again goes away.
define(‘DB_CHARSET’, ‘latin1’);
define(‘DB_COLLATE’, ”);But as a side effect of both of these changes/fixes to the wp-config.php file, it breaks the editor. When editing any post, the editor window is blank (both in the visual and text editors). It’s not until I return those lines above to this state that the editor returns to normal:
define(‘DB_CHARSET’, ‘utf8’);
define(‘DB_COLLATE’, ”);How can I resolve the issue with the odd characters displaying on the website without the side effect of breaking the WP editor?
-
Hi there,
On what site are you working? The account you’re using to post here does not own any sites on WordPress.com and was created only minutes before you posted this thread.
If you’re using the open source WordPress software at another host, please ask for help at https://wordpress.org/support/ instead.
-
If you believe this is a problem with the new block editor, you can report it directly in the subforum for the Gutenberg plugin, here: https://wordpress.org/support/plugin/gutenberg
-
-
- The topic ‘UTF-8 WordPress Encoding Issue (Editor Issue)’ is closed to new replies.