Support » Fixing WordPress » WP 2.2 Upgrade Messed Up Characters

  • Firas


    So I just upgraded to 2.2 and for some reason many of my characters that are non-ASCII (smart quotes, acute-accented characters etc.) are all messed up after the db upgrade. Check it out here:

    It turned:
    “à la mode. Condé Nast”
    “à la mode. Condé Nast”

    It’s not just a display encoding problem—they’re like that inside the db itself.

    Has anybody else experienced this? I imagine it’d be a nightmarish occurrence for anyone with a non-English blog! Any idea what can be done about it?

Viewing 15 replies - 1 through 15 (of 22 total)
  • MichaelH




    Yeah, rather strange… I didn’t change the default constants in there (DB_CHARSET was set to utf8 and DB_COLLATE was empty). I’m just not sure to what extent they’re involved in the db upgrade process… and it looks irreversible because the characters in the actual tables are messed up. May have been a combination of factors specific to my installation.

    I suppose at this point I’m mostly wondering if there’s something specific to mysql that can ‘fix’ the characters (I tried copying the posts table and changing the copy’s collation of the post_content row from latin1_swedish_ci to utf8_unicode_ci; no dice.)

    So yeah, I suspect I should despair at this point. All fairly annoying. You’d think upgrading WP wouldn’t be like getting axed in the forehead. (Et tu, WordPresse?)



    I’m having a similar character encoding problem on 1 of my sites, the weird thing is, I didn’t upgrade that site yet. It’s still 2.0.5 (I upgraded my other site to 2.2 and it does not have a character problem as far as I can tell).

    What I did do, is move servers, to a server that has the newer PHP and MySQL versions needed for 2.1+. And that’s when the weird characters got in my database, I think. Or I could be totally wrong but I noticed it right after that, got a Comment about it.



    Did you export or import your DB via phpmyadmin? That could have introduced the issue.



    Yeah, I did both Export from phpAdmin (older version), Import into phpAdmin (newer version). I remember I check-marked some option for the Import like MySQL3 compatibility.

    Should I have done it different?

    It’s probably too late to go back now, I mean, I could try importing again with an older Backup from the previous server (and I would have to repost the newer posts) — probably my WP-Database Backup file. I don’t have access to the old phpAdmin anymore so I can’t export again if that’s where my error was.

    By the way I found some apostrophes converted to questionmarks in my main site as well (the site that I have upgraded). 🙁



    i got this also… i just upgraded from 2.1.3 to 2.2

    i did not backup/export/import my database (maybe i should have)

    i just downloaded, deleted files, uncompressed and ran upgrade.php… all my spanish-language chars got messed up (and other chars like em dash)

    i have just spent about three hours re-typing every single spanish character in every post (good thing i did not have that much posts written)



    If you are doing an upgrade, you SHOULD NOT have DB_CHARSET and DB_COLLATE in your wp-config.php file. [1]

    Editing wp-config.php

    [1] if you previously (before 2.2) made changes to the SETNAMES and COLLATION in wp-db.php then you can use the wp-config.php file to make those settings without having to modify wp-db.php



    The same thing happened to me when I upgraded from 2.1.3 to 2.2. All my upgrades have been via fantastico. Is there any simple way to get this problem corrected? Should I try to roll back to 2.1.3 and wait for a future upgrade?



    I think that if you already went Upgrade > Made new posts > Then noticed the problem….

    it would be very hard to go-back…

    I think you’d have to get the Old database (before the upgrade messed up the characters), and reinstall that, and then re-make your subsequent posts.

    I doubt if rolling-back to a previous WP would repair the database. I could be wrong.

    For me personally 1 week or more passed before I saw the problems, now I don’t know what to do. Probably either change the errors by hand, or just live with an unreadable archives, or *maybe* going to try some kind of Find-Replace All in phpMyAdmin. Actually I think there is a WP plugin for “Replace all” in your database, I’m going to look for that.



    I just got an email from someone who reports having experienced this problem as well. The sad thing is that there is absolutely no way to go back that I can think of, your data is truly screwed. Anyway, googling around takes me to this post from April 06 which reports that doing search & replace should work.



    See this it may help.



    I have the same problem when uploading my database to my computer server.

    I checked the database with ultraedit and all words were ok, I don’t think a Find-Replace All is a good solution.

    and by the way, I didn’t manage to solve this issue.



    Ok, so I have the same problem, after upgrading from Fantastico to WordPress 2.2.

    I even tried re-posting one article with romanian characters and after submit, the characters got messed up again.



    Keep in mind that these are different issues:

    -> Characters in database are ok but not displaying correctly.
    -> Characters in database are wrong but fine after re-editing post content (which is the case with me.)
    -> Characters wrong in wp but still not fixed after re-editing via wp.

    They’re symptoms of entirely different problems, with accordingly different probable solutions. Make triple-sure you know where the error is occurring:

    -> Check your database in phpmyadmin to see if the original characters within it are wrong.
    -> The other thing that could be introducing the error is WP and/or its configuration (or something else in the php layer including phpmyadmin.)
    -> Then there could be a http/html issue making the browser misunderstand the intended character mapping.

    Again, first step when you see this: make sure you know what level the error is being introduced in.



    I have the character problem too. I upgraded using fantastico for my blog,

Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘WP 2.2 Upgrade Messed Up Characters’ is closed to new replies.