3 ms·
Note that it fails to parse CSV like: "x",""x"",,"x x","x" "y",,,,123
by gav 12y ago
Note that it fails to parse CSV like:
"x",""x"",,"x
x","x"
"y",,,,123
- knrz 12y agoThe previous commit (probably) failed at that. However, with the latest commit, parsing that malformatted CSV returns: [ ["x","x\"","","x"], ["x","x"], ["y","","","",123] ] I can't see anything wrong with it. Am I missing something?
- gav 12y agoIt should parse as: [ ["x","\"x\"","","x\nx","x"], ["y","","","",123] ] It's valid CSV, inasmuch as it's accepted and generated by a lot of tools and RFC 4180 ABNF: escaped = DQUOTE *(TEXTDATA / COMMA / CR / LF / 2DQUOTE) DQUOTE
- mholt 12y ago(Are you talking about Papa, seeing that your comment is a response to mine?) That CSV text is malformed. Arguably, the parsing succeeded, but the expected errors were generated and reported.