Closed lehoangphan closed 3 years ago
Although I use encode utf8, but data was written to file not has unicode
var writeCSV = async function(records) { const csvWriter = createCsvWriter({ path: 'C:\\Users\\phan\\Desktop\\file.csv', header: [ { id: 'stt', title: 'sothutu' }, { id: 'barcode', title: 'mã' }, { id: 'title', title: 'tựa' }, { id: 'unit', title: 'đơn vị' }, ], encoding: 'utf8' }); let m = await csvWriter.writeRecords(records) // returns a promise .then(() => { console.log('...Done'); }); }
Although I use encode utf8, but data was written to file not has unicode