From b61036b6fcf9efe7c7459c9b743dc89142b63359 Mon Sep 17 00:00:00 2001 From: GGlamer <52128225+Gamer201760@users.noreply.github.com> Date: Sun, 27 Sep 2026 22:59:01 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20BOM=20=D0=B8=20=D0=BD=D1=83=D0=BB=D0=B5?= =?UTF-8?q?=D0=B2=D0=BE=D0=B9=20=D0=BF=D1=80=D0=BE=D0=B1=D0=B5=D0=BB=20?= =?UTF-8?q?=D0=B2=20=D1=8D=D0=BA=D1=81=D0=BF=D0=BE=D1=80=D1=82=D0=B5=20CSV?= =?UTF-8?q?=20=D0=BF=D0=BE=20=D0=B8=D0=BC=D0=B5=D0=BD=D0=B8=20=D1=81=D0=B8?= =?UTF-8?q?=D0=BC=D0=B2=D0=BE=D0=BB=D0=B0=20=D0=B2=D0=BC=D0=B5=D1=81=D1=82?= =?UTF-8?q?=D0=BE=20=D0=BA=D0=BE=D0=B4=D0=B0?= 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 2ea4cf6..2070e61 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\N{ZERO WIDTH NO-BREAK SPACE}\N{ZERO WIDTH SPACE}") if probe.startswith(("=", "+", "-", "@")) or result.startswith(("\t", "\r", "\n")): return "'" + result return result @@ -96,7 +96,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 ("\N{ZERO WIDTH NO-BREAK SPACE}" + output.getvalue()).encode("utf-8") def _font_paths() -> tuple[Path, Path | None]: