• Resolved latext

    (@latext)


    I used the “mysqldump” command in my CLI to create a backup of my UTF8-encoded WordPress 2.6.2 blog.

    I then had to delete my MySQL database completely, and create a new one.

    I then used the “mysql” command in my CLI to restore the database from my backup.

    Everything worked fine, except that all accented chars and other non-ASCII chars appear as double chars. For example, the accented e is now “é”.

    So obviously the database was restored from the backup without the correct char encoding.

    My wp-config.php file still specifies “utf8”, so that’s not the problem. It appears that, in the process of backing up and then restoring from the backup, the Unicode char encoding was somehow lost.

    In the forums I found references to a couple of plug-ins that supposedly help, but they are not listed as compatible with WP 2.6.x, so I don’t want to take the chance.

    Is there a way to force MySQL to use the proper utf8 charset when restoring from the backup?

    Thanks in advance.

    Pierre

Viewing 1 replies (of 1 total)
  • Thread Starter latext

    (@latext)

    I guess I can answer my own post (with the help of a Swedish friend):

    The “mysql” command used to restore the db from the backup needs one additional argument:

    –default_character_set=utf8

    With that, the UTF8 encoding is correctly preserved.

Viewing 1 replies (of 1 total)
  • The topic ‘Character encoding problem after restoring from backup’ is closed to new replies.