python 中文错误 UnicodeEncodeError: 'ascii' codec can't encode characters
1 #coding:utf-8
2
3 #!/usr/bin/python
4 #python_mysqlexportcsv.py
5 import sys,csv
6 import MySQLdb
7 from datetime import timedelta, date
8
9 reload(sys)
10 sys.setdefaultencoding('utf-8'