How to fix: “UnicodeDecodeError: 'ascii' codec can't decode byte”

as3:/usr/local/lib/python2.7/site-packages# cat sitecustomize.py

encoding=utf8

import sys

reload(sys)
sys.setdefaultencoding(‘utf8’)

Let me check:

as3:~/ngokevin-site# python
Python 2.7.6 (default, Dec  6 2013, 14:49:02)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> reload(sys)
'sys' (built-in)>
>>> sys.getdefaultencoding()
'utf8'

你可能感兴趣的:(python)