2

I'm using MySQL 5.1.58 on Debian Sqeeze and I'm trying to restore the dump of a database. Once it is restored I noticed that all the accented chars had become other chars as ù or è: completely different.

Looking in the dump I've seen that the problem is not at importing, but at exporting, becouse the strange chars were in the dump.

I exported that dump from another installation of MySQL (5.5) on ArchLinux. I tried also to use the argument --default-character-set=8tf8 in mysqldump, but it did not work.

Thank you in advance.

0

1 Answer 1

1

This is a common issue with mysqldump. Instead of using utf8 as the default encoding, use latin1. Also, you can use -N (which will specify SET NAMES) so that the encoded text will not be re-encoded by mysql. I.e.:

mysqldump -u username -p --default-character-set=latin1 -N database > backup.sql
mysql -u username -p --default-character-set=latin1 database < backup.sql

(source)

You must log in to answer this question.