2013-04-27 101 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

回答

相關問題