fix: Add UTF-8 BOM to table CSV exports for Excel compatibility (#14894)

This commit is contained in:
Tom Moor authored and GitHub committed 2026-12-04 08:51:36 -05:00
1 parent 33456d9631
commit 43eca25a1e
1 file changed
+4 -1
+4 -1
View File
@@ -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;