PapaParse
PapaParse copied to clipboard
Ignoring accented characters
I am trying to parse a csv into json. there is an attribute in csv "CONTENT" which contains data "£20" and after parsing it gives "£20" as json. My papa.parse setttings are as follow:
Papa.parse(createReadStream(filePath), { header: true, encoding: "utf-8", skipEmptyLines: true, beforeFirstChunk: function (chunk) { let stringIndex = chunk.indexOf("First Name"); if (stringIndex >= 1) { return chunk.slice(chunk.indexOf("First Name")); } }, chunk: function chunk(results, parser) { if (results.data.length > 0) { csvData.push(...results.data) } }, complete: function () { resolve(csvData); } });
I want that "£20" should came as it is £20 in the json object, or at least A£20 as simple text. Kindly help me out here, many thanks in advance.
Probably related to #908
For me it should be fixed by setting the proper encoding