您的位置:首页 > 编程语言 > Python开发

【python编码】UnicodeDecodeError: 'gbk' codec can't decode byte 0xbf in position X

2017-04-18 15:20 369 查看
环境:win7 + python3.5.2

with open(path) as fin:
for line in fin:
print(line)


改为

with open(path,encoding="utf-8") as fin:
for line in fin:
print(line)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  python
相关文章推荐