PapaParse icon indicating copy to clipboard operation
PapaParse copied to clipboard

Ignoring accented characters

Open bilal68 opened this issue 3 years ago • 1 comments

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.

bilal68 avatar Dec 24 '21 12:12 bilal68

Probably related to #908

jdesboeufs avatar Jan 04 '22 20:01 jdesboeufs

For me it should be fixed by setting the proper encoding

pokoli avatar Feb 15 '23 07:02 pokoli