From 9c80ff716eec9550336cf15527198427336a3da7 Mon Sep 17 00:00:00 2001 From: dddennnisss Date: Mon, 27 Jul 2026 12:24:01 +0700 Subject: [PATCH] fix: CSV encoding utf-8-sig for proper Cyrillic display in Excel --- fetch_tickets.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fetch_tickets.py b/fetch_tickets.py index 964e36c..61efc0f 100644 --- a/fetch_tickets.py +++ b/fetch_tickets.py @@ -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)