6 ms·
I've seen ubiquitous use of tab-separated value files instead of csv, as as simpler format without quoting support and a restriction that your data fields can't
by PeterisP 5y ago
I've seen ubiquitous use of tab-separated value files instead of csv, as as simpler format without quoting support and a restriction that your data fields can't contain tabs or newlines, which (unlike commas) is okay for many scenarios.
- wodenokoto 5y agoBut that’s sort of the problem with csv. You never really know which rules your csv files has. Many .csv files are indeed tab separated.
- lordnacho 5y agoGotta wonder why the format isn't just a column separator char, a row separator char, and then all the data guaranteed not to have those two chars. Then you could save the thing by finding any two chars that aren't used in the data. I guess this is why we have a zillion formats.
- m_eiman 5y agoThen you can't edit or view it in a normal text editor, which is part of the appeal of CSV.
- ant6n 5y agoMaybe normal text editors should support the separators.
- alpaca128 5y agoThat and the fact that the comma (or semicolon, as I prefer it due to the rare usage) is on every keyboard. A text editor can be made to handle those separators, but editing or processing the file can be more cumbersome than csv and tsv.
- atoav 5y agoI guess if you use an strange character nobody has on their keyboard, you could also just make it a binary format for efficiency
- Brometheus 5y agoSee my sibling comment.
- Brometheus 5y agoASCII Code 29: Group Separator ASCII Code 30: Record Separator ASCII Code 31: Unit Separator https://theasciicode.com.ar/ascii-control-characters/record-separator-ascii-code-30.html https://theasciicode.com.ar/ascii-control-characters/record-...
- srik 5y agoThank you for pointing them out. I've browsed, and searched through that ascii table countless times, usually looking for something in particular, yet never realized that there were such a thing as separators before.
- kbouck 5y agothis doesn't directly address the ease-of-editing concern, but if you have csv (or tsv) and want ascii (0x1f, 0x1e) or unicode(U+241F, U+241E) separated (or vice versa), 'miller' [0] is a command line tool that supports converting among these formats with these one-liners: mlr --icsv --oasv cat input.csv # csv to asv mlr --iasv --ocsv cat input.asv # asv to csv [0] https://miller.readthedocs.io/en/latest/ https://miller.readthedocs.io/en/latest/ [1] https://miller.readthedocs.io/en/latest/file-formats/#csvtsvasvusvetc https://miller.readthedocs.io/en/latest/file-formats/#csvtsv...
- jph 5y agoYou're right, Miller is great for this, and it turns out that Miller already offers Unicode Separated Values (USV).
- cestith 5y agoIt makes more sense to me in these days of ubiquitous encoding of in-band data that it would be easier to edit if we just used tabs and newlines. If you need a tab in your data, the standard could support either \t (requiring \\t if you need a literal backslash followed by a literal 't') or %09 or &09; or \x09 or something.
- account42 5y ago
- chimprich 5y ago> Gotta wonder why the format isn't just a column separator char, a row separator char That's what the article proposes.
- thatjoeoverthr 5y agoIt’s a very meta-level problem. The main problem with CSV is “this is CSV” is an ambiguous statement. One could commit to a rule set, and give it a new name. Probably, someone has done this already.
- _Algernon_ 5y agoSounds like xkcd 927
- gregw2 5y agoThis is why you say RFC 4810 CSV
- deleted 5y ago[deleted]
- mmis1000 5y agoworks on telnet natively if data is always shorter than 8 character, i think. tab on terminal actually means to "indent to next align point (which is usually multiple of 8)