5 ms·
Its a crying shame we never settled on a control character separated text format. There's a ascii control characters for record and field (unit) separators. A b
by calvinmorrison 3y ago
Its a crying shame we never settled on a control character separated text format. There's a ascii control characters for record and field (unit) separators. A bit of user space support for that would have been great.
- galleywest200 3y agoIt is a shame. I have been using tab-separated sheets recently as it allows me to simply not care about almost any possible character in my strings...apart from tabs of course. But those are far less common than commas, and putting strings in quotes 100% of the time looks messy to me.
- calvinmorrison 3y agoWay less common would be using ascii 30 and ascii 31. ascii 29 and you can cram multiple datasets into one file
- bachmeier 3y agoAs I recall, you can tell Awk to use the control characters as record and field separators. Not helpful if you're getting your data from others, but if you're working by yourself, you have the option. I've come to use control characters as a default because it makes life so much easier.
- ufo 3y agoWhat do you recommend for viewing and editing such files?
- ac29 3y agoVisidata works with arbitrary separators. I just tried with a CSV separated with ␟ (ASCII unit separator) and it worked just fine.
- lolive 3y agoExcel too?
- leonim 3y agololive, VisiData has some Excel support. However, don't expect VisiData to be a full blown editor for Excel files. It can provide a view of the data in an Excel spreadsheet.
- dotancohen 3y agoI think GP means to ask if Excel can read files with ASCII 29,30,31 separators.
- smitty1e 3y agoIf you have a python installation available, openpyxl[1] is great both for converting to .csv and for packaging .csv outputs as .xlsx (which is really zipped .xml, anyway). [1] https://openpyxl.readthedocs.io/en/stable/index.html https://openpyxl.readthedocs.io/en/stable/index.html
- hermitcrab 3y agoSome discussion of that here: https://news.ycombinator.com/item?id=31220841 https://news.ycombinator.com/item?id=31220841 To be really useful as a format it would just need for text editors to: -display something distinct for the field separator (some editors do this) -treat the record separator character like a carriage return (not aware of any editors that do this)
- calvinmorrison 3y agoRight. The issue is the user space support at the end of the day.
- throw0101c 3y ago> To be really useful as a format it would just need for text editors to This made me think of WordPerfect's "reveal codes" functionality. :) (Word's "Reveal Formatting" is supposedly similar.)
- coldtea 3y ago>To be really useful as a format it would just need for text editors to: -display something distinct for the field separator Which would be trivial too.
- hermitcrab 3y agoThe programming might be straightforward. Trying to persuade the product owners to do it is a different matter.
- dotancohen 3y agoPull request?
- hermitcrab 3y agoAfter you. ;0)
- 3y ago
- JdeBP 3y agoMiller handles it. * https://miller.readthedocs.io/en/6.8.0/file-formats/#csvtsvasvusvetc https://miller.readthedocs.io/en/6.8.0/file-formats/#csvtsva... I have programs that handle it. * https://jdebp.uk/Softwares/nosh/guide/commands/console-flat-table-viewer.xml https://jdebp.uk/Softwares/nosh/guide/commands/console-flat-...
- PeterisP 3y agoTab-delimited "csv" formats are quite common (e.g. the CONLL format family for many natural language processing tasks) and also supported by common tools such as MS Excel for decades already.
- lolive 3y agoMost important comment I have ever read on HN ever !