From bb5e13709d4382fce1de359c9379133858badfe0 Mon Sep 17 00:00:00 2001 From: Claude Brisson Date: Thu, 11 Apr 2024 13:06:25 +0200 Subject: [PATCH] Do not put BOM when exporting json file --- view-webapp/src/main/webapp/js/tour-information.inc.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/view-webapp/src/main/webapp/js/tour-information.inc.js b/view-webapp/src/main/webapp/js/tour-information.inc.js index a26b3fe..e6db1d5 100644 --- a/view-webapp/src/main/webapp/js/tour-information.inc.js +++ b/view-webapp/src/main/webapp/js/tour-information.inc.js @@ -130,7 +130,9 @@ onLoad(() => { if (resp.ok) return resp.text() else throw "export error" }).then(txt => { - let blob = new Blob(['\uFEFF', txt.trim()], {type: 'application/json;charset=utf-8'}); + // json does not need BOM header + // let blob = new Blob(['\uFEFF', txt.trim()], {type: 'application/json;charset=utf-8'}); + let blob = new Blob([txt.trim()], {type: 'application/json;charset=utf-8'}); downloadFile(blob, `${shortName}.tour`); }).catch(err => showError(err)); });