Strange characters - despite everything being UTF-8
Not sure why this thread was closed, but this is the same issue inflicting many people.
All my WP config settings are in order:
//define('DB_CHARSET', 'utf8');
//define('DB_CHARSET', 'utf8_unicode_ci');
//define('DB_COLLATE', '');
I even tried enabling them one by one. None worked.
When I save a post, weird characters appear in place of apostrophes and spaces. This happens whether I type content manually or
I've tried a few plugins.
- UTF-8 Sanitize
- Convert WP to UTF-8
..etc.
None of them work. The problem persists.
I've also changed the database's character set and collation in MYSQL. Screenshot:
This is a screenshot of me entering some content by pasting it:
But immediately upon saving, the text comes back with garbled characters having replaced it:
What else?
I went through the rigmarole of dumping the entire MySQL DB, then removing all older non-utf8 characters via TR command.
tr -cd '\11\12\15\40-\176' file-with-binary-chars clean-file
Where the file-with-binary-chars
was the MySQL dump. Then I restored the table.
My MySQL config is all utf8:
[client]
default-character-set=utf8
[mysqld]
character-set-client=utf8
collation-server=utf8_unicode_ci
character-set-server=utf8
My browser is Chrome. The encoding is UTF-8 (in the VIEW menu).
What else can I do? Do I need to make all the plugin files utf-8 as well?
FYI, this blog is one of the Wordpress blogs. There are other newer Wordpress installations on the same server using the same installation of MySQL 5.6.17, but they don't have such an issue. My guess is that this being an older blog may have some variations in the text entered long ago, but frankly after having done all of the above, I really don't know what else I can do.
Thanks for any inputs or pointers!
Topic characters Wordpress encoding
Category Web