Support » Fixing WordPress » Convert database to UTF-8

  • Hi,

    I noticed that a guide for converting the WordPress character set is now available on the Codex. However, its instructions are pretty vague and I’m not comfortable following them.

    http://codex.wordpress.org/Converting_Database_Character_Sets

    Has anyone tried this successfully? If so, what were the commands you used to convert the database? I would love it if someone would post a SQL script to achieve this. Such a script should be bundled with the next WordPress install.

Viewing 8 replies - 31 through 38 (of 38 total)
  • the only issue I had with my upgrade and conversion is that my category descriptions were borked… I had used html headings in them and those disappeared. The conversion was slightly less successful for these bits of data, leaving  and a couple of other entities in category descriptions, but fixing them all in posts. Weird.

    Hi, I also wanted to note here that the same odd characters (questions marks, dollar signs, etc.) will appear if you’ve installed a new version of wordpress like 2.3.3 and remove the utf8 from wp-config.

    I previously thought my problem was the latin, and removed the utf8 from wp-config. All my old post suddenly has weird diamond-shaped blocks with question marks.

    Then I remembered I had made a complete re-install and imported my posts. I added the utf8 back in and everything looked fine except for some post I did after I had removed the utf8 setting.

    Make sure you trace your steps.

    I run the plugin on 2.3.3 & it appears to work. If I change the wp-config encoding to utf8 then the characters still appear wrong (quotes as a € for instance). So when I ran the plugin, did it do anything at all?

    I just did a conversion om my WP 2.3.3 installation using the UTF-8 Database Converter. In my MySQL db the charset was Latin 1 since I upgraded from an earlier version. After using the plugin all posts were trunckated to a variable number of words and most pictures were gone. All static pages were blank. Luckily I saw your posts before and had made a backup. I changed the charset in the dump from Latin1 to UTF-8 and executed in phpMyAdmin the SQL command to replace the existing tables with the altered dump. This worked! Everything is now back again and the charset is UTF-8. The whole operation took about 10 minutes.

    Hi,

    Sorry for being really out for a long time in this discussion.

    First pardon me that i haven’t released (yet) version 3.0 of my plugin, this version would be able to address more than 10 bugs in the current “stable” version plus will add new features for normal and advanced users/admins.

    Secondly, as i say before most of the bugs and behaviors discussed here has been fixed in the developmental version (currently unavailable for public -yes, its has not been uploaded to the svn-), so again i ask you to wait a little more time, the next version will be released some days after 2.5 is released.

    Regards

    Hi,

    I write my WordPress blog in Chinese. Is there anyone tried g3org3x’s plugins in Chinese or Japanese blogs?

    I am not sure if the plugins work for non-english charset…

    Brughagedis, I’m a little unclear about your procedures, I’m only a dba because I use WP, not because I know what I’m doing! I’ve got the same problem with character rendition that you had, upgrading from 2.0.2-Yahoo to a standard 2.3.2. Did you use g30rg3x’s converter, then modify the dump? Or did you just export it, specifying UTF-8, then import it? Or is there a phpMyAdmin command besides import that you used? Thanks…

    Hello cfcook76,
    My procedure was:
    1) Make a dump of the unalterred database. Which had Latin-1 charset, but probably filled with UTF-8 characters because I had allready upgraded to 2.3.3. and all entries in wp-config where allready to UTF-8. In the export menu I could not change the export format, so I assume it was Latin-1.
    2) I ran g30rg3x’s plugin, which changed all the tables and configuration files in the MySQL db to UTF-8. This worked very fine, but when I saw the blog all posts were scrambled up.
    3) I changed all the entries to the charset in the dump to UTF-8 and reimported the dump, replacing the original tables completely. This worked very fine for me. There was no single mistake in the blog characters and the plugin did the tidious work of changing the database entries for me. I only saw that a very few external feeds had the double character encoding described by Alex King. But on the blog itself everything was ok.

Viewing 8 replies - 31 through 38 (of 38 total)
  • The topic ‘Convert database to UTF-8’ is closed to new replies.