UnicodeDecodeError,无效的连续字节为什么下面的项目失败了?为什么它会成功使用“拉丁语-1”编解码器呢?o = "a test of \xe9 char" #I want this to remain a string as this is what I am receivingv = o.decode("utf-8")成果如下: Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\encodings\utf_8.py",
line 16, in decode return codecs.utf_8_decode(input, errors, True) UnicodeDecodeError:
'utf8' codec can't decode byte 0xe9 in position 10: invalid continuation byte
3 回答
翻阅古今
TA贡献1780条经验 获得超5个赞
添加回答
举报
0/150
提交
取消