fix(grid): add UTF-8 BOM to CSV export for Chinese compatibility
This commit is contained in:
parent
7f9fae9043
commit
bb2a3021ea
|
|
@ -1048,9 +1048,9 @@ async function saveFileContent(content: string, defaultFileName: string, filterN
|
|||
defaultPath: defaultFileName,
|
||||
filters: [{ name: filterName, extensions: [filterExt] }],
|
||||
});
|
||||
if (path) await writeTextFile(path, content);
|
||||
if (path) await writeTextFile(path, "" + content);
|
||||
} else {
|
||||
const blob = new Blob([content], { type: "text/plain" });
|
||||
const blob = new Blob(["", content], { type: "text/csv;charset=utf-8" });
|
||||
const url = URL.createObjectURL(blob);
|
||||
const a = document.createElement("a");
|
||||
a.href = url;
|
||||
|
|
|
|||
Loading…
Reference in New Issue