Home > Database > Mysql Tutorial > body text

解决Excel导入mysql数据库时汉字乱码的问题_MySQL

WBOY
Release: 2016-06-01 13:07:21
Original
2250 people have browsed it

1.  前提:数据库采用的是UTF-8编码

2.  将Excel另存为csv格式,导入mysql后如果出现乱码,说明转换后的csv文件不是UTF-8编码

3.  将csv文件用Notepad++软件打开,复制内容,新建txt文档,粘贴内容

4.  将txt文档另存,另存时编码方式选择为UTF-8,如下图:


5.  将txt文档的后缀改为.csv

6.  导入后不再乱码

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template