UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd5 in position 86: invalid continuation byte
时间: 2023-09-27 16:08:11 浏览: 162
这个错误说明在使用utf-8编码时,遇到了无法解码的字节0xd5。这通常是因为文本中包含了utf-8编码无法识别的字符。 在给定的引用中,问题发生在读取一个csv文件时,文件中包含了无法被utf-8解码的字符。 解决这个问题的一个方法是更改编码方式为gb2312,因为汉字通常采用这种编码方式。 另外,还可以尝试检查文本中是否有特殊字符或非utf-8编码的字符,并对其进行处理或删除,以确保能够正确解码。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [解决UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0xca in position 0: invalid continuation ...](https://blog.csdn.net/weixin_43789661/article/details/121518544)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *3* [解决UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0xcc in position 0: invalid continuation ...](https://blog.csdn.net/fghjjjikl/article/details/121206564)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文