3 ms·
I think we should just stop using commas and newlines and start using the ASCII unit separator and record separator. It would alleviate most quoting and escapin
by jtvjan 5y ago
I think we should just stop using commas and newlines and start using the ASCII unit separator and record separator. It would alleviate most quoting and escaping issues because those two rarely appear in actual text.
- teddyh 5y agoSure, maybe, but that won’t be CSV.
- Jiocus 5y agoMaybe that would be an "SSV"? Separator Separated Values file.
- SahAssar 5y agoThat would just make it easier to implement the standard in a way that works most of the time but breaks on valid input. Why would that be desirable?
- colejohnson66 5y agoUntil I can type those ASCII separators on my keyboard, they’re not going to happen. That’s why CSV won out: the comma key already existed.
- skissane 5y agoFor terminal mode applications, unit separator is Control+Underscore and record separator is Control+Caret (Ctrl+Shift+6 on a US English keyboard). However, many terminal mode applications intercept those keys and expect them to be commands rather than data. Often there is some kind of quote key which you can press first. In readline and vim, the quote key is Ctrl+V. In emacs, it is Ctrl+Q instead. GUI applications are more variable. But vim and emacs still support their respective quote keys in GUI mode. And if you have to type this a lot, you can modify your vim/emacs/readline/etc configuration to remove the requirement for the quote key to be pressed first.
- jpalomaki 5y agoOn the other hand, if the characters still technically can exist in the content, the rareness just makes the problems harder to spot. In this sense sticking to a relatively common separators is good, because they encourage you to do the right thing from the start.
- teknopaul 5y agosignificant whitespace is nasty, by definition its hard to see errors. Not convenient if you can't edit the format with a normal keyboard.