Closed angelo848 closed 3 years ago
A quick test shows that the BOM is there:
const json2csv = require("json2csv")
async function test(dataWithColumnNames, options) {
const csv = await json2csv.parseAsync(dataWithColumnNames, options);
console.log(csv[0] === '\ufeff');
}
const dataWithColumnNames = {
Nome_Aluno: "Yuri Meiber de Araujo",
Instituicao: "IE TESTE",
Curso: "CURSO TESTE",
Situacao: "Inadimplente",
Integracao: "Não possui", // the problem it's here
};
const options = {
delimiter: ';',
withBOM: true,
};
test(dataWithColumnNames, options);
Closing. Feel free to reopen if I've missed anything :)
json2csv version: 5.0.6 node version: 14.15.4 code:
example of the dataset: report.zip
My file output it's on the attachment, basically i'm using the "withBOM" option in the function, but the output still return without the BOM character