Reputation: 43
I have a datafile encoding by iso_1, and I changed it to UTF8:
file -i test.txt:
... text/plain; charset=utf-8
and mysql character_set is:
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/
My question is: Why the chinese character is still messy code?
ºâÑô...
Upvotes: 0
Views: 963
Reputation: 142298
Which of these were you expecting?
big5 6 2 '算栠'
gb2312, gbk 6 2 '衡阳'
eucjpms, ujis 6 2 '財剩'
ºâÑô
is "Mojibake" for one of those. See Trouble with UTF-8 characters; what I see is not what I stored
Some of the character_set_*
settings reference the encoding in the client. It is quite OK for a column to be utf8mb4
while the client is using big5
or gb2312
(etc), but you must do SET NAMES big5
or the equivalent.
Upvotes: 1
Reputation: 43
THANKS guys,I find use gb18030 covered to utf-8 worked.
But I dont know why the file -i
showed the file charset is iso-8859-1.
Upvotes: 0