Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignoring accented characters #907

Closed
bilal68 opened this issue Dec 24, 2021 · 2 comments
Closed

Ignoring accented characters #907

bilal68 opened this issue Dec 24, 2021 · 2 comments

Comments

@bilal68
Copy link

bilal68 commented Dec 24, 2021

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.

@jdesboeufs
Copy link

Probably related to #908

@pokoli
Copy link
Collaborator

pokoli commented Feb 15, 2023

For me it should be fixed by setting the proper encoding

@pokoli pokoli closed this as completed Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants