python 读取数据库,中文乱码问题

要指定charset为utf-8,否则读取出的中文会乱码

pymysql.connect('localhost', 'root', '12345', 'atm',charset='utf8')

猜你喜欢

转载自blog.csdn.net/miss_audrey/article/details/80166994