You are correct. I stand corrected.

Not only does it say that, the grammar is very clear about the quote vs no-quote. A "field" can be escaped or non-escaped.

The ABNF grammar [2] appears as follows:
file = [header CRLF] record *(CRLF record) [CRLF]
header = name *(COMMA name)
record = field *(COMMA field)
name = field
field = (escaped / non-escaped)
escaped = DQUOTE *(TEXTDATA / COMMA / CR / LF / 2DQUOTE) DQUOTE
non-escaped = *TEXTDATA

Pillai

On Dec 5, 2013, at 12:26 AM, John Yeung <gallium.arsenide@xxxxxxxxx> wrote:

On Wed, Dec 4, 2013 at 9:12 PM, Narayanan R Pillai <strqst400@xxxxxxxxx> wrote:
However, the default behaviour [of Excel] is not RFC compliant.

Yes it is. Immediately preceding the comment about Excel, it says

"Each field may or may not be enclosed in double quotes"

Which really doesn't say much. In terms of pure logic, it's saying
absolutely nothing. In English, it is saying that double-quotes are
not required, but are permitted, and thus if you want to read CSVs,
you should be on the lookout for double-quotes. It's perfectly fine,
according to the RFC, for a field to be enclosed in double-quotes, or
not enclosed at all. Excel chooses the latter.

John
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.