>>> a = u"中文" >>> print(a) 中文 >>> a_utf_8 = a.encode("utf-8") >>> print(a_utf_8.decode("utf-8")) 中文 >>> a_gb2312 = a.encode('gb2312') >>> print(a_gb2312.decode("gb2312")) 中文 >>>