PyMySQL Warning: (1366, \"Incorrect string value: '\\\\xF0\\\\x9F\\\\x98\\\\x8D t…')

余生颓废 提交于 2019-12-01 01:28:19
Rick James

You need utf8mb4, not utf8, when connecting to MySQL and in the columns involved.

More python tips: http://mysql.rjweb.org/doc.php/charcoll#python (Except use utf8mb4 in place of utf8. UTF-8 should not be changed.)

A more detailed explanation to this can be found here.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!