From 43eca25a1e42cdd6aa5a643ffb8cab5c29fc257f Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Fri, 4 Dec 2026 08:51:36 -0500 Subject: [PATCH] fix: Add UTF-8 BOM to table CSV exports for Excel compatibility (#14894) --- shared/editor/commands/table.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/shared/editor/commands/table.ts b/shared/editor/commands/table.ts index 521a969c2c..4097fd5e3b 100644 --- a/shared/editor/commands/table.ts +++ b/shared/editor/commands/table.ts @@ -261,7 +261,10 @@ export function exportTable({ ) .join("\n"); - const blob = new Blob([csv], { type: "text/csv;charset=utf-8;" }); + // UTF-8 BOM lets Excel detect the encoding when the file is opened directly. + const blob = new Blob(["\uFEFF", csv], { + type: "text/csv;charset=utf-8;", + }); const url = URL.createObjectURL(blob); const a = document.createElement("a"); a.href = url;