数据库编码全部弄好了
客户端的代码为
cursor.execute('insert into moods(author_id, '
'content, '
'img1, '
'img2, '
'timeline, '
'moodmark, '
'location, '
'create_time, '
'phone) '
'values (%s, %s, %s, %s, %s, %s, %s, now(), %s)'
, [author_id, content, img1, img2, timeline, moodmark, location, phone])
我在怀疑是不是插入语句将表情编码改变了,那我该怎么改呢?
大家帮我看看问题出在哪里,谢谢啦?
在连接之后,先
cursor.execute("SET NAMES utf8mb4")
就可以了