charset encoding

This commit is contained in:
Martin McKeaveney 2022-08-08 13:51:02 +01:00
parent 5b3d2da635
commit 9ec178c7c8
1 changed files with 4 additions and 2 deletions

View File

@ -106,8 +106,10 @@ exports.loadHandlebarsFile = path => {
*/
exports.apiFileReturn = contents => {
const path = join(budibaseTempDir(), uuid())
fs.writeFileSync(path, contents)
return fs.createReadStream(path)
fs.writeFileSync(path, "\ufeff" + contents)
let readerStream = fs.createReadStream(path)
readerStream.setEncoding("binary")
return readerStream
}
exports.defineFilter = excludeRows => {