打开文件问题
打开doc文件,提示以下问题>>> e=open('E:\\123.doc', encoding = "utf-8")
>>> e
<_io.TextIOWrapper name='E:\\123.doc' mode='r' encoding='utf-8'>
>>> e.read()
Traceback (most recent call last):
File "<pyshell#96>", line 1, in <module>
e.read()
File "D:\lib\codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd0 in position 0: invalid continuation byte 不能打开doc 解码格式不对
页:
[1]