mirror of
https://github.com/outline/outline.git
synced 2026-12-05 10:45:07 +03:00
fix: Add UTF-8 BOM to table CSV exports for Excel compatibility (#14894)
This commit is contained in:
1 parent
33456d9631
commit
43eca25a1e
1 file changed
+4
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user