~ python
Python 2.7.16 (default, Mar 25 2021, 03:11:28)
[GCC 4.2.1 Compatible Apple LLVM 11.0.3 (clang-1103.0.29.20) (-macos10.15-objc- on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> print "\xe2\x80\x98"
‘
上面的结果是一个中文的单引号。
>>> b = '编码'
>>> b
'\xe7\xbc\x96\xe7\xa0\x81'
>>> print b
编码
>>> c = u"机房"
>>> c
u'\u673a\u623f'
>>> print c
机房
以"\x"开头,接着两位数字或字母的,都是非unicode的中文字符,可以直接print出来他的含义。