2 ms·
> Linebreaks can be escaped in CSV In some variants of CSV. There isn’t agreement on the format. For example, https://www.ietf.org/rfc/rfc4180.txt https://www.
by Someone 3y ago
> Linebreaks can be escaped in CSV
In some variants of CSV. There isn’t agreement on the format. For example, https://www.ietf.org/rfc/rfc4180.txt https://www.ietf.org/rfc/rfc4180.txt says
“While there are various specifications and implementations for the CSV format (for ex. [4], [5], [6] and [7]), there is no formal specification in existence, which allows for a wide variety of interpretations of CSV files.”
That RFC doesn’t even agree with itself, saying
“1. Each record is located on a separate line, delimited by a line break (CRLF).”
but then following that up with:
“6. Fields containing line breaks (CRLF), double quotes, and commas should be enclosed in double-quotes”
- ReleaseCandidat 3y agoThere is no contradiction, as (1) does not say that "each record is located on a (exactly one) single separate line". But it could be better phrased, like "two consecutive records are separated by...". This is the "mathematical a", which does not mean "exactly one" but "at least one, and we don't care how many, we already did the interesting work". Like in "this problem has a solution".