It seems trim & quote doesn't work as expect #327
-
Thank you for build great crate for read/write csv content. I have a simple csv content look like:
I tried to read these content with following config:
But the result looks wrong.
For the seconds csv row, it looks more weird. I have to add flexbile to true. Then it parse to 6 fields.
Am I missing any config? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Yes, what you're missing is that your CSV data is invalid and the csv crate is trying to salvage it. This has nothing to do with the trim or quote options. You can't put spaces between fields in the csv data. You need to either fix your data or write bespoke code to fix it after parsing. |
Beta Was this translation helpful? Give feedback.
Yes, what you're missing is that your CSV data is invalid and the csv crate is trying to salvage it. This has nothing to do with the trim or quote options. You can't put spaces between fields in the csv data.
You need to either fix your data or write bespoke code to fix it after parsing.