I am getting what appears to become a problem associated with WordPress, though it may be another thing.
Here's what is happening:
I've got a blog with posts using utf-8 figures (simple ones like ’). The figures all display properly presently, however I am moving my website to a different server to see problems with the utf-8 chars (’ becomes â€™).
When i first thought the issue was with MySQL, but after considering it's appears to not be. I produced the brand new database using a synch with Navicat, and also have confirmed that both db's and all sorts of tables are utf-8. When viewing the information either in db in almost any SQL program I have attempted (Follow up Professional, Navicat) the chars appear unencoded (â€™). I have attempted various synching techniques, including ones that others have stated solved encoding problems, but they didn't work with me.
What confirmed it for me personally, was establishing an evaluation php script which drawn just one publish_content area from each database. Within the test script the chars appear encoded (’) no matter which db they are available from.
I checked the apache config file and located that HTTP_ACCEPT_CHARSET is placed towards the same (ISO-8859-1,utf-8q=.7,*q=.7) on systems.
Sooo, I am left thinking it's a WordPress problem, regarded course I possibly could be wrong.
Any help could be truly appreciated, Iâ€™ve been banging my mind about this for some time now )
What you're seeing is UTF-8 data being construed as though it were ISO-8859-1 (or Win-1252, or any other single-byte encoding). Problems such as this are nearly always a mismatch between your headers being delivered to the browser and also the actual encoding. Something is telling the browser the stream is ISO-8859-1 while really delivering UTF-8.
So, I have finally wound up utilizing a plug-directly into solve the issue. Listed here are the steps I required:
- Migrate the dwelling and content from the old database towards the new database using Navicat for MySQL (though I believe any approach to copying works).
- Alter the encoding from the posts within the wordpress_posts table to utf8 using
ALTER TABLE 'wp_posts' CHANGE COLUMN 'post_content' 'post_content' longtext CHARACTER SET utf8 NOT NULL after 'post_date_gmt';
- Make use of the ISO to UTF content plug in to transform any non-encoded chars innthe table to utf chars.