Do not put BOM when exporting json file

This commit is contained in:
Claude Brisson
2024-04-11 13:06:25 +02:00
parent 87e1883c64
commit bb5e13709d

View File

@@ -130,7 +130,9 @@ onLoad(() => {
if (resp.ok) return resp.text() if (resp.ok) return resp.text()
else throw "export error" else throw "export error"
}).then(txt => { }).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`); downloadFile(blob, `${shortName}.tour`);
}).catch(err => showError(err)); }).catch(err => showError(err));
}); });