Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. >>> a = u'\xb2\xe2\xca\xd4' >>> b = a.encode('raw_unicode_escape') >>> print b 测试 >>> c = a.encode('latin1') >>> print c 测试 >>>
http://docs.python.org/2/howto/unicode.html Latin-1, also known as ISO-8859-1, is a similar encoding. Unicode code points 0-255 are identical to the Latin-1 values, so converting to this encoding simply requires converting code points to byte values; if a code point larger than 255 is encountered, the string can’t be encoded into Latin-1.