[英]MYSQL CSV import Characters turn into '?'
I am new to MySQL and facing this trouble since many days ,please pardon my technical terminology. 我是MySQL的新手,而且已经经历了很多天的麻烦,请原谅我的技术术语。 After researching a lot and failing I decided to post the question.
经过大量研究和失败后,我决定发布问题。 I am using PHP and MYSQL to create customers web application.
我正在使用PHP和MYSQL创建客户Web应用程序。 The data from user comes in an excel file which goes into the application.
来自用户的数据进入一个excel文件,该文件进入应用程序。
The problem is this excel file has special characters all of them get converted to '?' 问题是此excel文件具有特殊字符,所有字符都转换为'?'。 when I import it into MYSQL using PHPMyAdmin GUI Import option.
当我使用PHPMyAdmin GUI导入选项将其导入MYSQL时。
What I have tried so far: 到目前为止我尝试过的是:
If someone can help me to solve this problem with CSV import , I would really appreciate it because moving forward user will be uploading the CSV and I can easily import data in MYSQL with 'LOAD DATA INFILE' command via PHP. 如果有人可以通过CSV导入帮助我解决此问题,我将不胜感激,因为向前的用户将上传CSV,并且我可以通过PHP的“ LOAD DATA INFILE”命令轻松地在MYSQL中导入数据。
Example of special characters : ' ² ' (square symbol). 特殊字符的示例:'²'(方形符号)。
我认为您可以尝试以下方法phpMyAdmin UTF-8 ,数据源,连接,数据库,php代码
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.