Join the discussion
Write your take first — we'll ask for email only when you're ready to publish.
- Hacker News
- Why was a comma originally chosen over, I dunno, say a pipe character?by pupppet
- The article seems to be unaware that Python has a built-in csv module.by bananamogul
- One can pipe it to an expression for viewing purposes:
sed $'s/\x1f/,/g; s/\x1e/\\\n/g; s/\x04//g' awk 'BEGIN { RS="\036"; FS="\037"; OFS="," } { sub(/\004$/, ""); $1=$1; print }'by OutOfHere - If you've dealt with the headache that can be FIX, you'll realize the annoyance this can be because unless your tooling is very aware you're doing this (it probably isn't, unless you've built your own) everything looks like garbage until you tune everything to make it pretty.
Works internally, breaks externally, which half of the benefit of a CSV is that you can give just about anyone the file and they can work with it.
by rigbert - I think we hugged it to death.by willk
- This is generally called ASV for ASCII-separated values, or USV for Unicode-separated values (e.g. U+241E, which is different from the ASCII U+001E equivalent).
Also, as wonderful as this would be, as other comments say, no one uses it because no one uses it.
by saulpw - The problem in practice with CCSV files, is they are no longer human editable, nor will tools like Excel automatically parsed them (maybe, I haven't checked in ~10 years, however I doubt CSV parsing has improved at all).
If the files aren't human editable anymore, why stick with CSV at all?
by nemothekid - This comes up every so often. I think there are good reasons it hasn't caught on. Here's a relevant comment from ten years ago:
> whole point is to be roughly human-readable and using non-printing characters defeats that. You can't even easily enter these things via the command line.
> If we're abandoning human-readability, why even bother with ASCII? Just use a binary format. Has anyone actually used ASCII unit and record separator delimiters successfully? I'd be curious about what advantages they had over a binary format, even just a protobuf or Thrift serialized form. If we want to preserve schemalessness, there's stuff like Sereal.
--- arjie, June 8, 2016
https://news.ycombinator.com/item?id=11862769
Here's another one from more than twelve years ago:
> I've done this.
> Everybody hated it. Most text editors don't display anything useful with these characters (either hiding them altogether or showing a useless "uknown" placeholder), and spreadhseet tools don't support the record separator (although they all let you provide a custom entry separator so the "unit" separator can work). Besides the obvious problem that there's no easy way to type the darned things when somebody hand-edits the file.
--- Pxtl, March 26, 2014
by bariumbitmap