Yes. That was an extra test case that I threw in while probing the limits of the parser - what's allowed and not allowed. This case is: instead of quoting the entire field, only part of it is quoted, e.g., a part at the beginning. I have no idea of whether such a construct is technically allowed or not according to the CSV specification. My experiment simply says that this parser doesn't like it. The OP isn't having trouble with this syntax and I haven't investigated further. I have never seen CSV generated like that before. Actually there are a whole bunch of other test cases with weird syntax that I cycled through which I didn't post.
When writing test cases, I usually put more cases in than just the "good machine" case because I want to verify the limits. "Bad machine" cases are also of interest if for nothing else than to verify that error handling works and doesn't "blow the whole thing up". For test case 4, I make no claim that it should or should not be parsed according the CSV spec (left for interested readers). All I can say is, "don't do that with this parser". | [reply] |