Search code examples
mysqlutf-8characterencodeiso-8859-1

ISO_1 to UTF8 failed


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?

ºâÑô...      

Solution

  • 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.