2013-04-27 82 views
-1
nano /usr/local/lib/python2.7/site-packages/sitecustomize.py 

import sys 
reload(sys) 
sys.setdefaultencoding('UTF-8') 

我完成后,为什么我无法更改我的Python默认编码?

[email protected]:/home/debian# python 
Python 2.7.3 (default, Jan 2 2013, 16:53:07) 
[GCC 4.7.2] on linux2 
Type "help", "copyright", "credits" or "license" for more information. 
>>> import sys 
>>> print sys.getdefaultencoding() 
ascii 

这是怎么回事?

+0

http://stackoverflow.com/questions/2276200/changing-default-encoding-of-python – Moj 2013-04-27 11:01:31

回答

相关问题