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

Implement --csv-trim-leading-space flag #1272

Merged
merged 2 commits into from
Apr 20, 2023
Merged

Conversation

johnkerl
Copy link
Owner

@johnkerl johnkerl commented Apr 20, 2023

Found while prepping for csv,conf,v7 (#1268). CSV files like this

"Year", "Quantity"
2015, 345

(note the non-compliant space after the comma) weren't being parsed successfully:

mlr: mlr: CSV header/data length mismatch 1 != 2 at filename x row 2.

With mlr --csv --csv-trim-leading-space these can now be parsed.

This is left non-default in accordance with Miller's general philosophy that it handles RFC-4180-compliant CSV by default.

@johnkerl johnkerl force-pushed the kerl/csv-trim-leading-space branch from eb34c98 to 77a6e37 Compare April 20, 2023 14:17
@johnkerl johnkerl force-pushed the kerl/csv-trim-leading-space branch from 85a9102 to 2dd887a Compare April 20, 2023 16:03
@johnkerl johnkerl marked this pull request as ready for review April 20, 2023 16:04
@johnkerl johnkerl merged commit 5801f5c into main Apr 20, 2023
@johnkerl johnkerl deleted the kerl/csv-trim-leading-space branch December 19, 2023 15:16
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

Successfully merging this pull request may close these issues.

1 participant