Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个用 UCS-2 Little Endian 编码的 csv 文件,我想将它上传到我的 MySQL 表中,该表用 UTF-8 编码 - 默认排序规则。我很好奇最好的方法是什么。如果我需要编写一个脚本,我可以这样做,尽管我希望有一个简单的解决方案!
谢谢, 弗里兹
recode
recode ucs2..utf8 thefile.csv
然后mysqlimport --default-character-set utf8 ...(通常的东西)
mysqlimport --default-character-set utf8 ...