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!
See this question: How to keep special characters when running ./mysqldump?
Try adding the switch: --default-character-set=UTF8
精彩评论