d
This commit is contained in:
@@ -145,7 +145,8 @@ def _write_txt(path, rows: list[dict]) -> None:
|
||||
|
||||
|
||||
def _write_csv(path, rows: list[dict]) -> None:
|
||||
with path.open("w", encoding="utf-8", newline="") as handle:
|
||||
# Add BOM so Excel on Chinese Windows opens CSV without mojibake.
|
||||
with path.open("w", encoding="utf-8-sig", newline="") as handle:
|
||||
writer = csv.writer(handle)
|
||||
writer.writerow([label for _, label in EXPORT_HEADERS])
|
||||
for row in rows:
|
||||
|
||||
Reference in New Issue
Block a user