
Graham Klyne wrote:
I feel compelled to ask the question: should this really be a text/csv type rather than application/csv? Past comments by Ned Freed with respect to text/html suggest possibly not, but similarity with text/tab-separated-values suggests maybe yes. I don't personally feel strongly about this.
Can you point to Ned's message?
Section 2:
[[ 6. Field containing line breaks (CRLF) and commas should be enclosed in double-quotes. For example:
"aaa","b CRLF bb","ccc" CRLF zzz,yyy,xxx ]]
Are there any CSV applications that actually quote newlines in values? (I'm not sure that my own CSV handling code would accept a newline within a quoted string)
Some of the code I have been working with is happens to do so. I think it depends on which application you are using. For example I just tried it with OpenOffice Calc v1.1.3 and it accepts newlines within fields.
[[ 7. If double-quotes are used to enclosed fields, then double-quotes inside fields must be surrounded by double quotes. For example:
"aaa","b"""bb","ccc" ]]
This is NOT how Excel handles quotes, nor my own code. Rather, when a quoted string contains a double-quote character, the double quote is doubled up. Thus the example would be: "aaa","b""bb","ccc"
I just double checked with the applications that I am using and they tend to work the way you describe. I will adjust the draft.
Section 7.1: [[ [3] Postel, J., "Transmission Control Protocol", STD 7, RFC 793, September 1981. ]]
I think this should be an informative reference, not normative.
Thanks for catching that. Yakov