If you recently upgraded to wordpress 2.2+ from earlier versions you may have found your posts have been all messed up with lots of Â, †and ™ characters dotted everywhere. This happened to Blogging Tips posts, I quickly removed them from all of the affected posts but I didn’t spend any time looking into what caused this to happen.
Last week I helped out Elina from My Lil Venture by upgrading her blog to wordpress 2.2.1. Elina emailed be back telling me that all of her posts were now filled with  and †characters, clearly this problem was something to do with the wordpress upgrade.
Here is an example of the output in one of Elina’s posts
I decided to look into the problem further as there are a lot of wordpress users who are having problems with this.
What causes these characters to appear after upgrading?
Wordpress added two new lines to the wp-config.php file in version 2.2
define(’DB_CHARSET’, ‘utf8′);
define(’DB_COLLATE’, ”);
In brief, DB_CHARSET lets you define the character set which is used on your blog and DB_COLLATE lets you set the order of the character set. I don’t want to go into too much details about these new variables as it will not concern the majority of wordpress users. You can find out more information about these variables here.
So why does this problem arise? Well, if you install a fresh copy of wordpress you will not get this problem however if your blog has been upgraded to 2.2+ from an earlier version of wordpress you will. This is because the wordpress upgrade does not convert the old Latin1 character set to the new UTF-8 character set during the upgrade. I’m baffled why wordpress did not speak more about this when they released wordpress 2.2 as it’s clearly something that is going to cause problems for a lot of bloggers.
How do you remove these strange characters from your posts?
There are a few ways you can fix this problem.
Don’t get too alarmed about this screen, just double check that you have backed up your blog database so if anything happens your covered.
Removing or commenting out the DB_CHARSET and DB_COLLATE references in your wp-config.php file is definately the quickest way to resolve this problem but I’ve no doubt that future versions of wordpress will include these new character variables so it might be worthwhile converting your database using the plugin I mentioned.
I hope that this guide will help wordpress users who have had problems with this. If you are unsure about anything please let me know and I will do my best to help.
thanks,
Kevin
Author comments are in a darker gray color for you to easily identify the posts author in the comments
Comments are closed since this post is older than 30 days. However, you can continue this discussion in our popular Blogging Forums
Hi Kevin, just wanna let you know I really appreciate all the effort that you put into helping me solve these problems. Thanks a bunch!
That’s a really interesting article – I upgraded when the new version released but didn’t notice these errors. Then again, I try to avoid using apostrophes in my articles so that may explain it.
I agree that it is odd that no mention was made of this by WordPress.
I am having a problem when I edit comments, I have to change all the code that appears in the ‘edit’ box to prevent the HTML from showing – is anyone else having this use?
- Martin Reed
Blogs do make money – Glad you liked the post
CBB – If you don’t use ‘ a lot your posts should be ok. If you need any help with the edit comment problem please let me know (can’t guarantee I’ll fix it but I’ll do my best)
Wow, you just solved me one of the biggest problems I had…
I’ve actually did most of this manually, but the plug-in conversion works Great.
I checked dozens of posts yesterday but I’ve just came across one of my older posts which still had one of those characters on it ie. after the database was converted. So I’m now not 100% sure how well the converter works. I know removing those lines from the wp-config.php field works perfectly though
Let me know how you all get on with this
Hi Kevin thanks for referring my work…
And as you say, even the converter works greats there are some minimal bugs that m still working on it, in the next 2 weeks i will release the next version of the plugin/converter that will resolve a lot of problems and mysql incompatibility’s between and 5, and other problems that i think will make a better solution…
So as you say even i spend much time creating and findinf the correct solution, the plugin is still a not general solution, i have see the basic bloggers will not have problems converting but pro-bloggers that have biggest databases and very modificated databases that its a challenge for me that i’m pretty sure i will win in the next version…
Grettings from mexico
Your more than welcome g30rg3_x. As far as I know your the only one who has brought out anything which resolves this.
Again, I’m surprised how little wordpress mentioned this when they moved to version 2.2
let me know if you release an update, im sure readers would want to know about it
Thanks for that, I’ve had this problem a few times and never knew how to resolve it
Good post Kevin
Thanks for the tip Kevin. I fixed the problem myself by exporting the WordPress database and then editing it with a text editor, using find and replace to replace all occurrences of apostrophes etc, then re-importing the database. But I would have preferred to not go to such lengths. Not particularly impressed that I could find no info in the support forums at WordPress.org at the time.
I’m kind of new to wordpress, so any help is welcome. Thanks!