Support » Fixing WordPress » Corrupt database – many of these characters–> Â

  • I find accented A characters (like this–> Â ) scattered in my WP posts after upgrade from 2.1.2 to 2.5. They seem to be at end of words as if extra space characters. When I fall back to 2.1.2 and re-import my backup 2.1.2 database file they are not visible in my posts. but when I re-converting the database with /wp-admin/upgrade.php I see them again in the posts. However using phpMyAdmin to read the raw file I see the bad characters in both the the converted and unconverted files. I’v moved thing back and forth so many times that I’m not sure that I didn’t corrupt the backup by an impropper setting in the phpMyAdmin export window. I’m using phpMyAdmin version which newer and has a few more tick boxes and entry/selection fields than in the WP backup instructions, but I did tick the boxes recommended, but didn’t mess with the other defaults that I did not understand.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Maybe for some unknown reason the locale of your database changed and foreign language characters appeared out of nowhere. I know that is irrational, but after all, your problem appeared irrationally. Go figure.

    Since you were careful and wise, and made a backup, you can “toy” with your database, now.

    My suggestion is : open your .sql backup in a text editor, and do a search-and-replace of your weird character with “nothing”.
    Save it under a different name, and replace your current online DB with that one, and see if it works 😉

    Rather than notepad, I’d recommend notepad++, it adds semantic coloration, understands unix line breaks (i.e. no more one-line impossible to understand css or php source files), and has more powerful functions when you want to to coding or searching, replacing.

    Good luck…

    For future reference, don’t copy paste from Word. It uses smart quotes, elipses, em-dashes…all things that wind up doing some pretty wacky junk when you move databases.

    This happens becuase in the new wp-config.php file it has a line that looks like this

    define('DB_CHARSET', 'utf8');

    This can be changed to UTF-8 or simply removed. Worked for me. Make sure the same charset is saved in the admin and in your webpage head.

    Need help, get in touch




    define(‘DB_CHARSET’, ‘utf8’);

    removing that will do nothing to affect chars that are converted during an import or upgrade that started as word related issues, such as reybeez suggests.

    When my host upgraded php that happened on one of my blogs and I solved it by adding // in front of define(‘DB_CHARSET’, ‘utf8’);


    //define(‘DB_CHARSET’, ‘utf8’);

    worth a shot




    thats the functional equiv of removing the line 🙂

    it works for some of these issues, but not all of them.

    I had the same issue after upgrading from 2.5 to 2.6.3
    I took Leergrears’ advice and deleted:

    define(‘DB_CHARSET’, ‘utf8’);

    from wp-config.php.

    Worked perfectly. Thanks!

    Thanks so much for the assistance here. Same issue going to WP 2.7. I commented it out and it instantly corrected everything, saving me the time of search and replace on 36 different (long) blog entries.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Corrupt database – many of these characters–> Â’ is closed to new replies.