From 4747b0a11858a5fc4a54d94d638fb9bd844740db Mon Sep 17 00:00:00 2001 From: GGlamer <52128225+Gamer201760@users.noreply.github.com> Date: Sun, 27 Sep 2026 22:33:42 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20=D1=8D=D0=BA=D1=81=D0=BF=D0=BE=D1=80?= =?UTF-8?q?=D1=82=20CSV=20=D1=81=D0=BD=D0=BE=D0=B2=D0=B0=20=D0=B4=D0=B5?= =?UTF-8?q?=D1=80=D0=B6=D0=B8=D1=82=20BOM=20=D1=8D=D0=BA=D1=80=D0=B0=D0=BD?= =?UTF-8?q?=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=BD=D1=8B=D0=BC=20=D0=B2?= =?UTF-8?q?=20=D0=B8=D1=81=D1=85=D0=BE=D0=B4=D0=BD=D0=B8=D0=BA=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/scoring/export.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/app/scoring/export.py b/backend/app/scoring/export.py index 2243f4b..0b664e7 100644 --- a/backend/app/scoring/export.py +++ b/backend/app/scoring/export.py @@ -19,7 +19,7 @@ def _cell(value: object) -> str: if value is None: return "" result = str(value) - probe = result.lstrip(" \t\r\n​") + probe = result.lstrip(" \t\r\n\\ufeff\\u200b") if probe.startswith(("=", "+", "-", "@")) or result.startswith(("\t", "\r", "\n")): return "'" + result return result @@ -98,7 +98,7 @@ def to_csv(report: SessionReport) -> bytes: row("Сверка самооценки", "", label, ", ".join(values)) for number, item in enumerate(report.notes, 1): row("Пометки преподавателя", number, item.transcript_ref, item.text, item.author) - return ("" + output.getvalue()).encode("utf-8") + return ("\\ufeff" + output.getvalue()).encode("utf-8") def _font_paths() -> tuple[Path, Path | None]: