João Pimentel Ferreira
João Pimentel Ferreira
I would not close this issue because I am facing the same problem. The `fromFile` method should support other encodings than UTF-8 IMHO. Do you agree @Keyang ?
I got it :) ```js const fs = require('fs') const csv = require('csvtojson') csv() .fromStream(fs.createReadStream('/path/to/file', { encoding: 'latin1' })) .subscribe((json) => { console.log(json) }, (err) => { throw err },...
@shaunstone0 did it work the solution? Would you please close the issue?
The docs are very clear IMHO https://github.com/Keyang/node-csvtojson#header-row
you're right, I read it too quickly
I don't understand your problem, the the `console.log` seems to output correctly the content of `jsonObj` What did you expect to see?
you can try to use the stream reader ```js const fs = require('fs') const csv = require('csvtojson') csv() .fromStream(fs.createReadStream('/pathToFile', { end: 1024 })) .subscribe((json) => { console.log(json) }, (err) =>...
@hetao92 please close the issue if this solves your problem
By default the 1st row of the csv file is the header https://github.com/Keyang/node-csvtojson#header-row Do not define `noheader` because there is a header (1st row).
@9thstudio if this solves your problem, please close the issue