问题
I have a MySQL4 database db4
(charset: latin1) which I want to copy to a MySQL5 database (standard charset: utf-8) db5
using the following command:
mysqldump -u dbo4 --password="..." --default-character-set="latin1" db4 | mysql -S /tmp/mysql5.sock -u dbo5 --password="..." --default-character-set="latin1" db5
The values of the entries are copied in a correct way. But the the german Umlaute (äüö...) which are contained in standard-values of some fields, are afterwards schown as "?"
What is wrong with my copy-command?
I simply want to keep everything as is was before (all data in the database stored as "latin1")
来源:https://stackoverflow.com/questions/11757158/how-to-maintain-character-set-of-standard-values-when-uploading-mysql-dump