Andres SK
Andres SK

Reputation: 10974

mysqldump with character issues

php code:

exec('mysqldump --opt --compress --host='.DB_HOST.' --user='.DB_USER.' --password='.DB_PASS.' '.DB_NAME.' > file.sql');

some characters are not being exported as they are in the DB. For example "ñ" becomes "ñ" -- am i missing a parameter in the mysqldump instruction? BTW, the DB is utf8. thanks!

Upvotes: 2

Views: 297

Answers (1)

JYelton
JYelton

Reputation: 36512

See this question: How to keep special characters when running ./mysqldump?

Try adding the switch: --default-character-set=UTF8

Upvotes: 1

Related Questions