python中解决读写文件内容出现乱码问题,f.write
f = open(newfnstr+"_data.xml", "w+",
w带不带+,都会出现乱码,最后发现直接在open中加入encoding='utf-8'就可以解决
f = open(newfnstr+"_data.xml", "w", encoding='utf-8')
f.write(wjt)
python中解决读写文件内容出现乱码问题,f.write
最新推荐文章于 2024-05-19 17:34:05 发布