mysql只能插入特定的中文字符,什么原因?
怪我咯
怪我咯 2017-04-17 15:47:19
0
4
641
怪我咯
怪我咯

走同样的路,发现不同的人生

reply all(4)
Peter_Zhu

Is the encoding of your database utf8?
Change the encoding to utf8mb4 and give it a try

巴扎黑

I guess your shell window does not support utf8.

But I set the encoding to utf8.

The client sent gbk. But the server understood it as utf8. So an error was reported.

迷茫

Portal
Coding:
Mei C3B7
生C9FA

Then please see the discussion in the portal for details.

左手右手慢动作

Thank you everyone for your answers, the problem has been solved. After modifying the character set, I still cannot insert Chinese characters. This is because my database and tables were created before the character set was modified. After the modification, I re-created the database and table, and I can insert normally. Later, I checked the encoding of the database and table, and sure enough I found that the encoding of the attribute was latin1.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template