UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc4 in position 8: invalid continuation byte
时间: 2023-08-26 18:14:58 浏览: 188
引用在上述引用的情况中,错误的原因可能是文件中包含了无法使用utf-8编码正确解码的特殊字符。解决这个问题的方法是在读取或解码文本时指定正确的编码格式,例如使用encoding参数来指定正确的编码格式,如'utf-8-sig'、'gbk'等等,以便正确解码文本。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0xc5 in position 13: invalid continuation ...](https://blog.csdn.net/devil8123665/article/details/125156027)[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^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte xx in position xx: invalid continuation byte](https://blog.csdn.net/weixin_43718742/article/details/121992195)[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^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0xc9 in position 26: invalid continuation ...](https://blog.csdn.net/qq_68655023/article/details/129725275)[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^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文