From 9d343318c15a6428f45940e0839070a784d93589 Mon Sep 17 00:00:00 2001 From: "Begerad, Stefan" Date: Wed, 15 Jun 2022 07:13:31 +0200 Subject: [PATCH] feat(string2fileDload): adjust download config --- string2fileDload/src/components/dload.jsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/string2fileDload/src/components/dload.jsx b/string2fileDload/src/components/dload.jsx index d830ce3..0760183 100644 --- a/string2fileDload/src/components/dload.jsx +++ b/string2fileDload/src/components/dload.jsx @@ -7,7 +7,12 @@ function Download(){ let inputValue=null; if(typeof inputElem !== 'undefined' && inputElem !== null) { inputValue=inputElem.value; - const file = new Blob([inputValue], {type: 'text/plain'}); + const file = new Blob( + [inputValue], + { + type:'text/plain;charset=utf-8' + } + ); element.href = URL.createObjectURL(file); element.download = "dloadFile.csv"; document.body.appendChild(element);