Traceback (most recent call last): File "/Users/c2apple/PycharmProjects/easyToPython/fileMethod.py", line 94, in <module> line=fp.readline() File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/codecs.py", line 321, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xef in position 99: invalid continuation byte
出現這種情況是由於讀取后進行轉碼出現錯誤,遇到了非法字符,解決的方法是檢測讀取的文件編碼,再進行下一步轉碼形式處理
