原文:python Incorrect string value: '\\xF0\\x9F\\xA6\\x86\\xF0\\x9F...' for column

方法一:修改数据库字符集 将数据库中表的字符集改为 utf mb 排序规则改为 utf mb general ci 数据库连接中的字符集也要修改为 utf mb : 参考: https: blog.csdn.net weixin article details Mysql中 utf 与 utf mb 字符集的区别: https: stackoverflow.com questions what i ...

2020-10-16 12:15 0 489 推荐指数:

查看详情

Incorrect string value: '\xF0\x9F\x90\xB1' for column ......

MySQL Error: Incorrect string value: '\xF0\x9F\x90\xB1' for column ......这个问题,原因是UTF-8编码有可能是两个、三个、四个字节。Emoji表情或者某些特殊字符是4个字节,而Mysql的utf8编码最多3个字节,所以数据插 ...

Tue Oct 15 22:09:00 CST 2019 0 1172
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM