不知道为什么,明明是utf-8偏偏会遇到bom的问题,那就奥里给
\u2022
def u8togbk(self, infn, outfn):
with open(infn, 'r', encoding='utf-8') as f:
reader = csv.reader(f)
results = list(reader)
results[0][0] = results[0][0].replace('\ufeff', '').replace('\xa0', '').replace('\u3000', '').replace('\u2022', '')
with open(outfn, 'w', encoding='gbk', newline='') as f:
writer = csv.writer(f)
for result in results:
writer.writerow(result)
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。