我正在使用python2,我想将非utf-8文本转换为可读字符串。我也在尝试用拉丁语1和utf-8解码。但我没有成功。
这是绳子
s = ' ÃâäÃâÃÂ¿ÃÆÃ ÃâäÃâÃÂ²ÃÆÃ ÃâäÃâþ ÃÆÃ ÃâäÃâÃÂ®ÃÆÃ ÃâÃ¥âÃâ¬ÃÂ¡ÃÆÃ ÃâäâÃâ¬ÃÅ¡ÃÆÃ ÃâäÃâÃÂ¦ÃÆÃ ÃâäÃâÃÂ¾ÃÆÃ ÃâäÃâè ÃÆÃ ÃâäÃâÃÂ°ÃÆÃ ÃâÃ¥âÃâ¬ÃÂ¹ÃÆÃ ÃâÃÂ¥Ãâ¦Ãâ ÃÆÃ ÃâäâÃâ¬ÃÂ¡ÃÆÃ ÃâäâÃâ¬ÃÅ¡ÃÆÃ ÃâäÃâÃÂ¦ÃÆÃ ÃâÃÂ¥Ãâ¦ÃâÃÆÃ ÃâäÃâð'
我试过:
s.decode('utf-8')
我得到以下输出:
u' \xc3\u201a\xc2\xa4\xc3\u201a\xc2\xbf\xc3\u0192\xc2 \xc3\u201a\xc2\xa4\xc3\u201a\xc2\xb2\xc3\u0192\xc2 \xc3\u201a\xc2\xa4\xc3\u201a\xc2\xbe \xc3\u0192\xc2 \xc3\u201a\xc2\xa4\xc3\u201a\xc2\xae\xc3\u0192\xc2 \xc3\u201a\xc2\xa5\xc3\xa2\xc2\u20ac\xc2\xa1\xc3\u0192\xc2 \xc3\u201a\xc2\xa4\xc3\xa2\xc2\u20ac\xc2\u0161\xc3\u0192\xc2 \xc3\u201a\xc2\xa4\xc3\u201a\xc2\xa6\xc3\u0192\xc2 \xc3\u201a\xc2\xa4\xc3\u201a\xc2\xbe\xc3\u0192\xc2 \xc3\u201a\xc2\xa4\xc3\u201a\xc2\xa8 \xc3\u0192\xc2 \xc3\u201a\xc2\xa4\xc3\u201a\xc2\xb0\xc3\u0192\xc2 \xc3\u201a\xc2\xa5\xc3\xa2\xc2\u20ac\xc2\xb9\xc3\u0192\xc2 \xc3\u201a\xc2\xa5\xc3\u2026\xc2\u201c \xc3\u0192\xc2 \xc3\u201a\xc2\xa4\xc3\xa2\xc2\u20ac\xc2\xa1\xc3\u0192\xc2 \xc3\u201a\xc2\xa4\xc3\xa2\xc2\u20ac\xc2\u0161\xc3\u0192\xc2 \xc3\u201a\xc2\xa4\xc3\u201a\xc2\xa6\xc3\u0192\xc2 \xc3\u201a\xc2\xa5\xc3\u2026\xc2\u2019\xc3\u0192\xc2 \xc3\u201a\xc2\xa4\xc3\u201a\xc2\xb0'
上述输出仍然不可读。
任何帮助都将不胜感激