Home>Article>Database> Why does phpmyadmin import csv with garbled characters?

Why does phpmyadmin import csv with garbled characters?

Guanhui
Guanhui Original
2020-05-11 15:58:29 2515browse

Why does phpmyadmin import csv with garbled characters?

Why does phpmyadmin import csv with garbled characters?

1. It may be that the character sets are different, so pay attention to converting characters;

2 , the character set of csv may be gb2312, and the character set of the database may be utf-8;

3. You should also pay attention to the character set of the PHP program code itself.

Solution:

Output the character set of the web page. It is best to unify them all into utf-8. Before importing data, you can transcode it through the editor and save it as a UTF-8 encoded csv file. (Most editors have such a function), such as EditPlus. If imported through PHP, you can also use PHP's iconv to transcode.

The above is the detailed content of Why does phpmyadmin import csv with garbled characters?. For more information, please follow other related articles on the PHP Chinese website!

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