fix csv encoding problem

This commit is contained in:
cokeBeer
2022-09-27 18:44:18 +08:00
parent 714b4120f1
commit 7162e40d2e
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -330,6 +330,8 @@ def export_all_results(path, name, fmt, datas):
row_list.append(Record(keys, values))
rows = RecordCollection(iter(row_list))
content = rows.export(fmt)
if fmt == 'csv':
content = '\ufeff' + content
save_to_file(path, content)