My file contains such strings : \xe6\x97\xa5\xe6\x9c\x9f\xef\xbc\x9a I want to read the content of this file and transfer it to the corresponding gbk code,a kind of Chinese character encode style. Everytime I was trying to transfer, it will output the same thing no matter which method was used. It seems like that when Python reads it, Python will taks '\' as a common char and this string at last will be represented as "\\xe6\\x97\ \xa5\\xe6\\x9c\\x9f\\xef\\xbc\\x9a" , then the "\" can be 'correctly' output,but that's not what I want to get.
Anyone can help me? Thanks in advance. -- http://mail.python.org/mailman/listinfo/python-list