-
Notifications
You must be signed in to change notification settings - Fork 75
Open
Description
Hello,
Thanks for this awesome project!
I've tested the csv parser a bit, and it seems that one behavior doesn't match the expected.
We have the quotes
parameter on readCsv
and readDelimiter
methods. From what I've understood, it allows us to consider delimiter chars wrapped inside of quotes as part of the cell value, and not as a real delimiter.
I think the same behavior should be applied for new lines/line breaks.
Example:
COLUMN1,COLUMN2,COLUMN3
value1,value2,value3
Will be parsed as:
COLUMN1 | COLUMN2 | COLUMN3 |
---|---|---|
value1 | value2 | value3 |
But
COLUMN1,COLUMN2,COLUMN3
value1,"value2
part2",value3
Will be parsed as (at least from what I've observed):
COLUMN1 | COLUMN2 | COLUMN3 |
---|---|---|
value1 | value2 | |
part2 | value3 |
I think it should instead be parsed as:
COLUMN1 | COLUMN2 | COLUMN3 |
---|---|---|
value1 | "value2\npart2" | value3 |
Note: When exported a CSV from Excel for example, if cells contains line breaks, they will be formatted as the above example in the exported CSV file.
Let me know if I misunderstood something!
Jolanrensen
Metadata
Metadata
Assignees
Labels
No labels