在打开文件:
fhandle = open('./song_comments1.txt', 'a')
更改为:
fhandle = open('./song_comments1.txt', 'a',encoding='utf-8')
设置以utf-8打开文件。
版权声明:本文为LCYong_原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。
在打开文件:
fhandle = open('./song_comments1.txt', 'a')
更改为:
fhandle = open('./song_comments1.txt', 'a',encoding='utf-8')
设置以utf-8打开文件。