3 ms·
I didn't like CSV because too much actual data has commas in it, so commas aren't a good delimiter.
by sp332 4y ago
I didn't like CSV because too much actual data has commas in it, so commas aren't a good delimiter.
- slivanes 4y agoQuoting every column is a safe way to handle this, at the cost of slightly larger files. You can then escape a quote with another quote.
- robocat 4y agoThat is just one simple problem. People say CSV is hard because it is hard: https://www.delimited.dev/csv-file-quirks/ https://www.delimited.dev/csv-file-quirks/
- patwolf 4y agoFrom the perspective of reading/writing CSVs programmatically, I actually prefer that it's a common character. You'll discover very quickly whether the parser handles escapes correctly. With a more exotic delimiter it might be a long time to discover the problem, and by then it will be harder to fix. From the perspective of writing CSVs by hand in a text editor, commas suck.
- EvanAnderson 4y agoTabs are a better delimiter than commas. Using the ASCII control characters meant for record and field delimiters are even better: https://en.wikipedia.org/wiki/C0_and_C1_control_codes https://en.wikipedia.org/wiki/C0_and_C1_control_codes