37,741
社区成员
发帖
与我相关
我的任务
分享>>> s = ""
>>>
>>> s
'\xee\xa1\xa3'
>>> Python 2.7.3 (default, Apr 20 2012, 22:39:59)
[GCC 4.6.3] on linux2
Type "copyright", "credits" or "license()" for more information.
==== No Subprocess ====
>>> a = '\xfe\x9f'
>>> b = a.decode('gb18030')
>>> c = b.encode('utf-8')
>>> a,b,c
('\xfe\x9f', u'\u4dae', '\xe4\xb6\xae')
>>> print a,b,c
þ゚ 䶮 䶮
>>> >>> x = '\xb9\xa8'
>>> y = x.decode('gbk')
>>> print y
龚
>>>