You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Gary Gregory <ga...@gmail.com> on 2013/03/26 15:24:05 UTC

CSVFormat newBuilder() value

Hi All:

Why is a CSVFormat newBuilder() NOT the RFC? Since the RFC is the only
'public standard', why not use that? If not, or why not use a well known
format like Excel. I am just wondering why we are picking what looks like
an arbitrary set of values which is the RFC with the empty lines set to
false.

Thank you,
Gary

-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: CSVFormat newBuilder() value

Posted by Emmanuel Bourg <eb...@apache.org>.
Le 26/03/2013 15:24, Gary Gregory a écrit :

> Why is a CSVFormat newBuilder() NOT the RFC? Since the RFC is the only
> 'public standard', why not use that? If not, or why not use a well known
> format like Excel. I am just wondering why we are picking what looks like
> an arbitrary set of values which is the RFC with the empty lines set to
> false.

Because CSV is a land full of arbitrary stuff :) RFC 4180 is not a
standard, it is merely an informational RFC. Other RFCs in this category
include these pearls:

  UTF-9 and UTF-18 Efficient Transformation Formats of Unicode
  https://tools.ietf.org/html/rfc4042

  Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0)
  https://tools.ietf.org/html/rfc2324

  Electricity over IP
  https://tools.ietf.org/html/rfc3251

I took another look at RFC 4180 and it's not clear to me how the empty
lines are supposed to be handled, this case is not explicitly mentioned.
Considering that it's better not to lose information when parsing I'm
inclined to think that empty lines shouldn't be thrown out by default.

Emmanuel Bourg