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

Incorrect handling of windows line endings #1082

Open
esetnik opened this issue Jan 13, 2025 · 2 comments
Open

Incorrect handling of windows line endings #1082

esetnik opened this issue Jan 13, 2025 · 2 comments

Comments

@esetnik
Copy link

esetnik commented Jan 13, 2025

20250110171129_Advanced_Report_Writer_d0d0e030-redacted.csv

Using this file with the demo on Papa Parse:
image

Produces the following error:

Parsing file... File {name: '20250110171129_Advanced_Report_Writer_d0d0e030-redacted.csv', lastModified: 1736785804636, lastModifiedDate: Mon Jan 13 2025 11:30:04 GMT-0500 (Eastern Standard Time), webkitRelativePath: '', size: 68, …}
demo.js:175 Parse complete
demo.js:176        Time: 5.800000011920929 ms
demo.js:177   Row count: 2
demo.js:180      Errors: 2
demo.js:182 First error: {type: 'FieldMismatch', code: 'TooManyFields', message: 'Too many fields: expected 2 fields but parsed 3', row: 0}code: "TooManyFields"message: "Too many fields: expected 2 fields but parsed 3"row: 0type: "FieldMismatch"[[Prototype]]: Object
demo.js:236     Results: {data: Array(2), errors: Array(2), meta: {…}}
demo.js:175 Done with all files
demo.js:176        Time: 6.300000011920929 ms
demo.js:177   Row count: 2
demo.js:180      Errors: 2
demo.js:182 First error: {type: 'FieldMismatch', code: 'TooManyFields', message: 'Too many fields: expected 2 fields but parsed 3', row: 0}

This is a valid csv file with \r\n line endings.

@esetnik esetnik changed the title Incorrect handling of windows file endings Incorrect handling of windows line endings Jan 13, 2025
@esetnik
Copy link
Author

esetnik commented Jan 13, 2025

Maybe related to #1075

@esetnik
Copy link
Author

esetnik commented Jan 13, 2025

I downgraded to v5.3.2 and the same file is working as expected. #998 Seems to be an issue with versions >5.3.2

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

1 participant