Re:A love letter to the CSV format
by HelloNurse on Thursday March 27, 2025 @05:04AM
(#43491615)
You should know that "should" isn't very binding.
Headers should have as many rows as possible that contain data items for their column and data items in a row should have a header for the respective columns, but real CSV files should be assumed to have incomplete or variable length lines.
> This header will contain names corresponding to the fields in the file and should contain the same number of fields as the records in the rest of the file
But of course, CSV is the wild west and there's no guarantee that any two encoders will do the same thing (sometimes, there's not even a guarantee that the same encoder will do the same thing with two different inputs).
[0] https://www.ietf.org/rfc/rfc4180.txt