当前位置:Gxlcms > 数据库问题 > Mysql写入中文出错

Mysql写入中文出错

时间:2021-07-01 10:21:17 帮助过:9人阅读

本地调试好像正常,服务器运行报错:

UnicodeEncodeError: ‘latin-1‘ codec can‘t encode character u‘\u5206‘ in position 2: ordinal not in range(256)

 

解决:

conn.set_character_set(‘utf8‘)

Mysql写入中文出错

标签:写入   运行   nic   can   调试   nbsp   服务器   error   char   

人气教程排行