by nmz · 2y ago · 0 comments
- supporting "" (single)
- Supporting newlines in "", oops, now you can't getline() and instead need to getdelim()
- Supporting comments # (why is this even a thing)
- Supporting multiple "" in a field
- Escaping " with "" or \"
- length based csv, so all fields are seekable.
It's a mess, which one's your csv?
No CSV I have ever encountered has comments.
(Oh and I forgot about headers, headers should be mandatory but people are aloof about it)
So yes, I am happy with code that works for a subset of files. There are thousands of applications which work with CSVs and they all do exactly this.