vincentlaucsb / csv-parser

A high-performance, fully-featured CSV parser and serializer for modern C++.
MIT License
864 stars 144 forks source link

Quote character not removed properly #201

Closed zazolabs closed 3 months ago

zazolabs commented 2 years ago

If there is a space after the comma, i.e.

val1, val2, "val3", val4

the col[2] is "val3 - it is trimmed but the first quote is not removed.

val1, val2,"val3", val4

without space it gives the correct result.

vincentlaucsb commented 3 months ago

This CSV parser was intended to parse fields delimited by a single delimiter whether it be comma, tab, pipe, etc.

By having a space after the comma, you essentially have fields delimited by two characters (comma + space) ,.

That's beyond the scope of this library and I don't see an easy way to accommodate it.