简单检测脚本:
import codecs file_path = '/Users/mac/Downloads/test.xml' with open(file_path) as source_file: data = source_file.read() if data[:3] == codecs.BOM_UTF8: print('******* Have BOM *******') else: print('******* No BOM *******')
简单检测脚本:
import codecs file_path = '/Users/mac/Downloads/test.xml' with open(file_path) as source_file: data = source_file.read() if data[:3] == codecs.BOM_UTF8: print('******* Have BOM *******') else: print('******* No BOM *******')
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M