View Single Post
  #2   (View Single Post)  
Old 19th June 2008
ohauer ohauer is offline
Port Guard
 
Join Date: May 2008
Location: germany
Posts: 32
Default

Hopefully you have a good dump before changes are applied.

You can try to convert the dump with iconv.

Dump the tables without data
$> mysqldump -d --database SourceDB -u YourMySQLAdmin -p > SourceDB_tables.dump

Dump the data only
$> mysqldump -n -t --database SourceDB -u YourMySQLAdmin -p > SourceDB_data.dump

Replace the encoding in the SourceDB_tables.dump file with new encoding and create a new database to test the next steps with this file.

To see all encodings that can be used with iconv
$> iconv -l

Now convert the data to the new encoding.
$> cat SourceDB_data.dump | iconv -f US-ASCII -t UTF-8 > SourceDB_data.utf8

Now import the converted data to the new database, if all went OK you are fine.

I cannot describe the exact steps for the ex/import since i don't use MySQL but i hope the way is clear now.
Reply With Quote