fix: CSV encoding utf-8-sig for proper Cyrillic display in Excel
This commit is contained in:
+2
-2
@@ -144,8 +144,8 @@ def list_tickets(from_date="2026-07-20", json_file=None, csv_file=None):
|
||||
json.dump(rows, f, ensure_ascii=False, indent=2)
|
||||
print(f"LOG: JSON сохранён: {json_file}")
|
||||
|
||||
# Сохраняем CSV
|
||||
with open(csv_file, 'w', encoding='utf-8', newline='') as f:
|
||||
# Сохраняем CSV (utf-8-sig для корректного отображения кириллицы в Excel)
|
||||
with open(csv_file, 'w', encoding='utf-8-sig', newline='') as f:
|
||||
writer = csv.DictWriter(f, fieldnames=["group", "description", "assignee", "category"])
|
||||
writer.writeheader()
|
||||
writer.writerows(rows)
|
||||
|
||||
Reference in New Issue
Block a user