开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜