4 ms·
It is strictly less expressive, because it can't handle nesting. This makes it inferior.
by tbrownaw 13y ago
It is strictly less expressive, because it can't handle nesting. This makes it inferior.
- lowboy 13y agoWhat would make one pair of ASCII characters (comma/linefeed or tab/linefeed) handle nesting any better than another pair (unit separator/record separator)?
- tbrownaw 13y agoBecause CSV actually has three special characters. The field separator is ',' (or tab for TSV). The record separator is '\n' (or "\r\n"). And the quote/escape character is '"'. Commas or newlines which are part of a quoted string are data rather than control characters. Quote characters can be escaped by preceding them with a second quote character. There is an RFC that describes this. You could use ESC (\x1b) to escape itself and either of your delimiter characters, but of course now you've gotten back all that complexity you were trying to avoid by using non-printable characters.