Open dwightkelly opened 8 years ago
I've never run into this, but if I preflight that row I do see it. I wonder why. Perhaps the CSVs I've been using have been quoting with double quotes. I'll look into it.
Is this even a valid standard convention? When I open files like this in Sheets or Excel, I see one quote on the right side. It seems that the single-quote is a special field in spreadsheets which indicates something numeric being treated as text. Double quotes are handled fine.
From RFC 4180
Each field may or may not be enclosed in double quotes (however some programs, such as Microsoft Excel, do not use double quotes at all). If fields are not enclosed with double quotes, then double quotes may not appear inside the fields. For example:
"aaa","bbb","ccc" CRLF zzz,yyy,xxx
Fields containing line breaks (CRLF), double quotes, and commas should be enclosed in double-quotes. For example:
"aaa","b CRLF bb","ccc" CRLF zzz,yyy,xxx
If double-quotes are used to enclose fields, then a double-quote appearing inside a field must be escaped by preceding it with another double quote. For example:
"aaa","b""bb","ccc"
So quoting fields with single quotes within CSV is a non-standard convention?
yes, but created by popular software. Also be aware that you can escape a double quote as "" or \"
I don't know if we can easily support that. The underlying libraries used here parse data very similar to Excel. So given that these are not standard, we would need to write our own parser to support this sort of thing. We could process the list beforehand to achieve something similar though.
The data values are displayed with their quoting characters. As data values may actually include escaped quoted characters I think you'd not want to display those that aren't part of the data value.