SQL statement error: Incorrect string value: '\ xE9 \ x98 \ xBF \ xE6 \ x96 \ xAF ...'

Obviously the problem is coded. Checked the $ conn-> query ( "set names utf8"); it has been added to the code. Could it be that the database encoding is not utf8?

I looked really is not

So right to modify the table, click on the alter table, made the following modifications.

Do not report any desired reboot the server and tried again

Sure enough, or the wrong. . . . I've seen such a scene, and has long been bearish. So then troubleshoot the problem.

Copy the database to find the SQL statement is executed in this sub-sub, Chinese add command completely impossible, but it is normal to manually add:

 Listen online to change the coding still not utf8mb4

then! Hey, according to Baidu experience this last test the next:

To change the coding of the first column: ALTER TABLE signup MODIFY tname VARCHAR (10) CHARACTER SET "utf8"; and then try to insert a first column on the normal insertion of the Chinese! So the remaining columns do the same operation, normal inserted:

PHPweb problem will be solved.

 

(In fact, I do not know why I have students do so well, to me this fight various monsters come out to me, may be interested to hone me / Tanshou, but fortunately I've seen people storms, a good attitude.)

Guess you like

Origin www.cnblogs.com/littleLittleTiger/p/11029473.html