Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B0168D18E for ; Sun, 6 Jan 2013 10:31:14 +0000 (UTC) Received: (qmail 24608 invoked by uid 500); 6 Jan 2013 10:31:14 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 24464 invoked by uid 500); 6 Jan 2013 10:31:14 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 24455 invoked by uid 99); 6 Jan 2013 10:31:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Jan 2013 10:31:13 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of claus.ibsen@gmail.com designates 209.85.215.47 as permitted sender) Received: from [209.85.215.47] (HELO mail-la0-f47.google.com) (209.85.215.47) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Jan 2013 10:31:09 +0000 Received: by mail-la0-f47.google.com with SMTP id fh20so12643083lab.20 for ; Sun, 06 Jan 2013 02:30:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=R7jOyyxxqqgNDlIYGlYU4JOW7nvVwcTd5Z4XuA5ZI3w=; b=HEYT9agxcljxV3StHE7ifXAuu/RH3LD3pZPAXFdux7gAAinK9Vir8TCpLq/quBw83e JIQmzkWUWBM1L2lqX6A57Tg8118NUiY7yHdQQ8Eek9TNZwcN6cBWuCz+pbpZzPsqASRL njMtwcEF1abGNjzvy6dXEbwLmdzZWBv2ZWfRg0rkHM3E3K3ewk8TxRb6sJwnC3OtB+3j VQLDNPvxp/ZGrhbOIVCqVa2ce42dP3c8+QoI7Xr7YAJSh4ER6p98p3KTUPb4uveCT4ab Aspq+XWTTLEeR694gYBuU5EZ0B3gE7HTIhvQGpx1EFOALWzoVc/ZkVCpxzpAJY+MJr+6 jEYQ== Received: by 10.152.111.68 with SMTP id ig4mr55638176lab.50.1357468248078; Sun, 06 Jan 2013 02:30:48 -0800 (PST) MIME-Version: 1.0 Received: by 10.112.103.129 with HTTP; Sun, 6 Jan 2013 02:30:28 -0800 (PST) In-Reply-To: References: From: Claus Ibsen Date: Sun, 6 Jan 2013 11:30:28 +0100 Message-ID: Subject: Re: unmarshall csv problem with bindy To: users@camel.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Hi Yeah I think bindy has some issues with parsing data that has optional quotes. We recently fixed an issue and improved the quote parsing. But there was an incompatible change so it was only applied on trunk, eg Camel 2.11. I suggest if you got a bit of time, to try your code against Camel trunk and see if that fixed your use-case as well. If not, then feel free to log a JIRA ticket. So we can get it fixed in 2.11. On Thu, Jan 3, 2013 at 4:14 AM, Ramiro wrote: > Im working with Karaf 2.2.10 and Camel 2.10.1. I receive a file, parse the > csv to a pojo, and do some other suff. My problem is that if a field in a > record on the csv ends with a coma like the third field here: > > someFieldValue,someOtherFieldValue,"aaaa ,",moreStuff > > It puts together aaaa , with moreStuff in a single field(ignoring the > second quote). But if i add something like: > > someFieldValue,someOtherFieldValue,"aaaa , bbb",moreStuff > > It gets processed without a problem(aaaa , bbb in a field, moreStuff in > another). Seems like Camel is interpreting the ," pair like something to > escape. > > Im using comma as the separator, and i've tried with other separators and > setting the quote attribute of the @CsvRecord to single and double quotes. > > > Is this expected behaviour, or some known bug? Any workarounds? -- Claus Ibsen ----------------- Red Hat, Inc. FuseSource is now part of Red Hat Email: cibsen@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen