mirror of
https://github.com/datahub-project/datahub.git
synced 2025-12-26 09:26:22 +00:00
refactor(web-react): add encoder to support non-ASCII characters csv download (#10496)
This commit is contained in:
parent
cf3ccf0ba9
commit
71e79ba40d
@ -1,5 +1,5 @@
|
||||
export function downloadFile(data: string, title: string) {
|
||||
const blobx = new Blob([data], { type: 'text/plain' }); // ! Blob
|
||||
const blobx = new Blob([data], { type: 'text/plain;chartset=utf-8' }); // ! Blob
|
||||
const elemx = window.document.createElement('a');
|
||||
elemx.href = window.URL.createObjectURL(blobx); // ! createObjectURL
|
||||
elemx.download = title;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user