Python : UnicodeEncodeError: 'gbk' codec can't encode character '\u200b' in position

Python:网络写入到本地文件时遇到这种gbk xxx ‘\200b’ 编码问题

UnicodeEncodeError: ‘gbk’ codec can’t encode character ‘\u200b’ in position

解决方法:

encoding'utf-8'
with open(r"xx","w",encoding'utf-8') as f:
		xxx
发布了41 篇原创文章 · 获赞 5 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/qq_43472877/article/details/90048833