haskell-hvr / cassava

A CSV parsing and encoding library optimized for ease of use and high performance
http://hackage.haskell.org/package/cassava
BSD 3-Clause "New" or "Revised" License
223 stars 107 forks source link

Fix handling of double quote for unescaped fields #181

Closed mulderr closed 4 years ago

mulderr commented 4 years ago

Attempts to fix #98

Up for review. Please see the issue for details. Deceptively simple so even I'm suspicious :) Tests pass.

In short, currently, the parser fails on unescaped fields containing " such as abc "d". This allows such fields to be parsed.

mulderr commented 4 years ago

Ah, mystery solved. This seems to violate RFC4180:

If fields are not enclosed with double quotes, then double quotes may not appear inside the fields.

I'll just close this I guess ;/ Sorry for the noise.