zig-csv icon indicating copy to clipboard operation
zig-csv copied to clipboard

`error: MisplacedQuote` if theres a space between 2 quoted entries

Open xdBronch opened this issue 1 year ago • 1 comments

this example CSV fails to parse with the error MisplacedQuote

"hour", "minute"
3, 17

im not very familiar with CSV, multiple other libraries/online validators accepted this CSV but another one didnt. is this expected? are the ones that did accept this non standard compliant?

xdBronch avatar Oct 04 '23 20:10 xdBronch

Hi @xdBronch, I would say CSV format is usually considered quite loosely defined. So it depends on how much variation a project wants to accommodate.

I would side with CSV spec such as RFC 4180: Common Format and MIME Type for Comma-Separated Values (CSV) Files which is quite strict and without digging too heavily into its grammar I would say your example would be invalid. I don't see a point in trying to handle unnecessary deviations such as this that would probably not occur in machine-generated CSV.

beho avatar Apr 22 '24 18:04 beho