1. 前提:数据库采用的是UTF-8编码
2. 将Excel另存为csv格式,导入mysql后如果出现乱码,说明转换后的csv文件不是UTF-8编码
3. 将csv文件用Notepad++软件打开,复制内容,新建txt文档,粘贴内容
4. 将txt文档另存,另存时编码方式选择为UTF-8,如下图:
5. 将txt文档的后缀改为.csv
6. 导入后不再乱码
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn