1.数据库查出来是正常中文,用MySQLdb查出来却是问号
db = MySQLdb.connect(...); print db.character_set_name()
查看编码集
解决:
db = MySQLdb.connect(..., charset='utf8')
来自:http://blog.csdn.net/hu330459076/article/details/7828512
db = MySQLdb.connect(...); print db.character_set_name()
查看编码集
解决:
db = MySQLdb.connect(..., charset='utf8')
来自:http://blog.csdn.net/hu330459076/article/details/7828512