\ufeff 错误:非法字符:“\ufeff”Java python
\ufeff
使用python打开txt文件,总是开始出现\ufeff,
解决方法;只需将编码格式进行相应的修改,把 UTF-8 编码 改成 UTF-8-sig
file=open("班.txt","r",encoding='utf-8')
修改为
file=open("班.txt","r",encoding='utf-8-sig')
https://blog.csdn.net/weixin_49274450/article/details/122914754