Hi I think its how the Apache Commons CSV library work. The code in camel-csv is small. You are of course welcome to debug and see what happens.
The Apache Commons CSV project is not active maintained much. On Mon, Sep 26, 2011 at 9:54 AM, livensn <[email protected]> wrote: > Hi all, > > This is our route, everything works fine. > > CsvDataFormat csv = new CsvDataFormat(); > csv.setDelimiter(";"); > > onException(RuntimeException.class).handled(false).to("bean:exceptionProcessor", > "direct:readData").stop(); > from(from) > .to("seda:fileQueue"); > > from("seda:fileQueue").noAutoStartup() > .routeId("csvProcessingRoute") > .setProperty(Exchange.CONTENT_ENCODING, > constant("UTF-8")) > .unmarshal(csv) > .process(csvProcessor) > .split(body()) > .process(csvMappingProcessor) > .process(upsertProcessor) > .end() > .process(fileDoneProcessor) > .to("direct:readData"); > > But, when we have a csv datafile which is missing any double quotes which > surround a field, camel fails to unmarshal it and puts a question mark in > front of the file. This ofcourse gives us problems at processing the file. > > Is there any fix for this? Or is there any solution available? Or does it > just need to be in a perfect format for camel to unmarshal it? > > Thanks in advance > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Unmarshal-csv-tp4840523p4840523.html > Sent from the Camel - Users mailing list archive at Nabble.com. > -- Claus Ibsen ----------------- FuseSource Email: [email protected] Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
