在使用MySQL存储含中文的字典时,出现:codec can't encode characters in position 64-65
的错误提示,原因是没有定义字符编码
在数据库连接时加上charset=utf8
mdb = pymysql.connect('localhost', 'root', '123456', 'jd_seach',charset='utf8')
在使用MySQL存储含中文的字典时,出现:codec can't encode characters in position 64-65
的错误提示,原因是没有定义字符编码
在数据库连接时加上charset=utf8
mdb = pymysql.connect('localhost', 'root', '123456', 'jd_seach',charset='utf8')
本文标题:codec can't encode characters in
本文链接:https://www.haomeiwen.com/subject/jscapftx.html
网友评论