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!