News for hackers. Stuff that matters.
Re:A love letter to the CSV format by meepmorp on Wednesday March 26, 2025 @04:53PM (#43487190)
> CSV is lists of lists of fixed length.

I'd definitely put that in my list of falsehoods programmers believe about CSV files.

Re:A love letter to the CSV format by hajile on Wednesday March 26, 2025 @07:13PM (#43488563)
It seems to be indicated by RCF-4180 which says

> 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

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.

Re:A love letter to the CSV format by hajile on Thursday March 27, 2025 @10:08AM (#43493841)
NOTHING is very binding about the CSV spec and that's the biggest problem with CSV.
Re:A love letter to the CSV format by timacles on Wednesday March 26, 2025 @06:48PM (#43488347)
CSV is a text file that might have commas in it
Re:A love letter to the CSV format by miningape on Wednesday March 26, 2025 @08:55PM (#43489304)
yeah if I had a cookie for every time I've had to deal with this I'd have maybe 10 cookies - it's not a lot but it's more than it should be.