Backing up UTF-8 content using mysqldump
Posted by: Tal Rotbart
Date: January 24, 2006 12:30PM

Hi!

I'm using MySQL 4.1.15 on Debian GNU/Linux, and am using mysqldump to create a backup for the database. I am using mysqldump and not hot-copy on purpose as I want the backup to be in modifyable plain-text.

My problem is that my schema contains UTF-8 characters. UTF-8 works just fine while working with the DB from Java, phpMyAdmin but not with mysqldump.

The table's default encoding and colation is latin-1 but I choose specific columns to be in the utf8-bin collation and encoding.

The output from mysqldump seems to be ok:
A. The table creation includes the UTF-8 encoding and colation on the apropriate column.
B. The table data contains the unicode characters (double bytes) in the apropriate column data.

However when imported back in, each UTF-8 is shown as its composite bytes.

I tried adding the connection encoding to equal UTF-8 at the beginning of the dump but this didn't help.

Any clue?

Thanks,
Tal Rotbart
iContact Media Ltd.

Options: ReplyQuote


Subject
Views
Written By
Posted
Backing up UTF-8 content using mysqldump
26609
January 24, 2006 12:30PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.