Python中的编码错误问题

设置python运行环境的编码参考这里   http://diveintopython.org/xml_processing/unicode.html



《Dive Into Python》 的 Example 9.15. sitecustomize.py

# sitecustomize.py 
# this file can be anywhere in your Python path,
# but it usually goes in ${pythondir}/lib/site-packages/
import sys
sys.setdefaultencoding('utf-8')




SQLAlchemy的问题请参考这里

http://firefish.blog.51cto.com/298258/112794

create_engine(connstr+"?charset=utf-8", encoding='utf8', convert_unicode=True)
上一篇:PYTHON多进程编码结束之进程池POOL


下一篇:错误提示:sun.security.validator.ValidatorException: PKIX path building failed