Hi all,

I'm using CsvDataFormat to unmarshal a csv file, modify some of the fields
and then marshal it back to csv again. I only wants to modify a few fields
and the let the other one be untouched. 

Everything works fine but my problem is that I don't get the quotes on my
output files as I want. I would like to have quotes on the output fields
when there is quotes on the input field, or be able to force all fields to
have quotes on the output fields.

I have only been able to have get quotes on the output field when there is
an extra blankspaces in the input field, example: (tab as delimiter and
ignore surrounding blankspaces set to false)
Input record: "0"   "1 "   "2"    4
Current Output record: 0    "1 "    2    4
Wanted Output record: "0"    "1 "    "2"    4

I would like that the quote on the output records follows the input record
Any suggestions how to do this?

Snippet of my camel route:
final CsvDataFormat csv = new CsvDataFormat();
csv.setLazyLoad(Boolean.FALSE);
csv.setDelimiter("\u0009");
csv.setRecordSeparator("\r\n");
csv.setIgnoreSurroundingSpaces(Boolean.FALSE);
...
 .unmarshal(csv)
 .beanRef("csvParser")
 .marshal(csv)
 
The csvParser returns a List<Map&lt;String, String>>

I'm using Camel 2.15.0

Regards
Hans-Christian



--
View this message in context: 
http://camel.465427.n5.nabble.com/Problem-to-write-quotes-correct-on-CSV-fields-when-marshalling-with-CsvDataFormat-tp5765477.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to