修改默认代码到utf8:
[python]
[root@hz ~]# python
Python 2.7.7 (default, Jun 28 2014, 18:11:47)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.getdefaultencoding()
'ascii'
>>> ^C
>>> reload(sys)
>>> sys.setdefaultencoding('utf8')
>>> reload(sys)
>>> sys.getdefaultencoding()
'utf8'
[/python]
SourceByrd's Weblog-https://note.t4x.org/other/change-ascii-to-utf8/
申明:除非注明Byrd's Blog内容均为原创,未经许可禁止转载!详情请阅读版权申明!