Re:Friends don't let friends export to CSV
by wombatpm on Tuesday March 26, 2024 @02:31AM
(#39824789)
No you don’t. It’s a holdover from when files were on tapes. The logic is all inverted too. Record separators were at the beginning of a record. Group and unit separators could then be nested. You really needed a spec for whatever document you were trying to makt
[ Parent
| on HN ]
Re:Friends don't let friends export to CSV
by rightbyte on Tuesday March 26, 2024 @03:43AM
(#39825121)
It doesn't matter if the sentinel byte is after or before each record.
Having it before is nice for syncing byte streams.
Re:Friends don't let friends export to CSV
by wombatpm on Tuesday March 26, 2024 @10:24AM
(#39828227)
It matters when you trying to roundtrip the data through a text editor because existing tools balk at a 300MB file with a single line.
Re:Friends don't let friends export to CSV
by Repulsion9513 on Tuesday March 26, 2024 @05:30PM
(#39833095)
You need a "spec" just the same for a CSV: does it have headers, is there a consistent column ordering, etc. Control characters work the exact same as commas and newlines, but you don't have to worry about escaping them because (unless your data is binary or recursive) the control characters won't show up in the data!