Ready to get started?Download WordPress


Stray chars inserted in old posts after 2.6 upgrade (8 posts)

  1. cormanaz
    Posted 6 years ago #

    Hi. I just upgraded from 2.3 to 2.6. All my old posts has stray characters inserted in them, for example there is  after many of the periods, and things like this:

    video games are an “interactive text” which the user

    How to fix?



  2. cormanaz
    Posted 6 years ago #

    Well...I did some investigating, and surmising that this was a character encoding issue, I commented out the line in wp-config.php that says

    define('DB_CHARSET', 'utf8');

    That fixed the problem. I don't know if it is a long term fix though because they editor might be storing the posts in UTF-8, and leaving the charset unspecified could cause problems. Does anyone know how to convert the existing posts in the DB to UTF-8?


  3. infinisource
    Posted 6 years ago #

    I had the exact same issue after upgrading from 2.1.X to 2.6 tonight and found this post. You were correct - commenting out that define statement seems to remove the stray characters in the posts.

    Kind of strange. Unfortunately I don't have time to troubleshoot as to why this was happening because this was a blog that a customer was paying me to manage - not the blog their domain/website, the blog just happens to reside on the site.

    I hope the good people at WordPress take note that this is definitely happening and not to just 1 person.

  4. cormanaz
    Posted 6 years ago #

    I have done some posts since commenting out that line and there are no ill effects. Kind of makes me wonder why it was put in there to begin with.

  5. cmguajardo
    Posted 6 years ago #

    I wasn't able to delete this line: define('DB_CHARSET', 'utf8'); without affecting my new posts after the upgrade. I have also converted my database from latin1 to utf8 in the meantime, but it didn't help the old posts.

    I finally downloaded the Search and Replace plugin http://wordpress.org/extend/plugins/search-and-replace/

    Once activated, I was able to "replace" odd characters like  and †by leaving the "with" box blank in the case of double spaces after a full stop (I learned how to type old school and can't break the habit) or by inserting the correct symbol (ie. & % or whatever character was being replaced by the weird characters) and clicking the "go" button.

    Worked like a charm.

    This chart helped find some of those codes http://www.web-source.net/symbols.htm

  6. Ashton.Sanders
    Posted 5 years ago #

    Awesome! Thanks for all of the great info and links.

    I still have one problem The special character "Â" is not being replaced. I have tried using the WordPress search and replace plug-in as well as hand coding it into MySQL. I can do all the other symbols except that one. Any ideas?


  7. infinisource
    Posted 5 years ago #

    Ashton - take a look at my blog, I believe I may have found a permanent solution to this, if your setup is like mine.

    Let me know if you have any questions... I know what a pain this special character has been for all of us!!

  8. luke3210
    Posted 5 years ago #


    You are a legend.

    I've been trying to work this out for about 3 or 4 hours and with your simple fix it's now sorted.

    infinisource, your way's a bit to difficult for relative newbies like me, but what do i know!

    Thanks guys. You're the best

Topic Closed

This topic has been closed to new replies.

About this Topic