camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sadiq <sadiq.ma...@sap.com>
Subject Re: Parsing issue with unmarshal and bindy.csv with double quotes and commas in a single field
Date Mon, 24 Apr 2017 16:04:55 GMT
Hi souciance and Onder,

Thanks for your reply.

In a CSV, a field can be encapsulated by double quotes in case there are
commas within the field that should not split the field.

So the following should be just 3 fields:
345,"1971-79 Fan Blade 19-1/2, 7 Blade",Available

And Bindy handles this scenario.

The issue is that the second field also has a double quote (to represent
inches) that needs to be escaped (escaping a double quote in CSV requires 2
double quotes) in order to be stored as a double quote:
345,"1971-79 Fan Blade 19-1/2""",Available

Bindy also handles this scenario.

However, when both an escaped double quote and a comma are present within a
double quote wrapped field, this is when the parsing breaks:
345,"1971-79 Fan Blade 19-1/2"", 7 Blade",Available

This is what I believe to be a bug.



--
View this message in context: http://camel.465427.n5.nabble.com/Parsing-issue-with-unmarshal-and-bindy-csv-with-double-quotes-and-commas-in-a-single-field-tp5797871p5798199.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message