You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Yonik Seeley (JIRA)" <ji...@apache.org> on 2008/01/04 23:40:34 UTC

[jira] Updated: (SANDBOX-206) backslash before quote character gives an error

     [ https://issues.apache.org/jira/browse/SANDBOX-206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yonik Seeley updated SANDBOX-206:
---------------------------------

    Attachment: csv_escape.patch

Patch atteched:
 - adds an escape char to the strategy
 - disables escaping by default (need to double the encapsulation char)
 - when enabled, escaping works as expected (the escape char is expected
   to be escaped with itself, escaping other chars results in just that char)
 - code simplifications... got rid of skipRead, tokenReady checking in the
   innermost loops.

Barring objections or further input, I'll commit soon.

> backslash before quote character gives an error
> -----------------------------------------------
>
>                 Key: SANDBOX-206
>                 URL: https://issues.apache.org/jira/browse/SANDBOX-206
>             Project: Commons Sandbox
>          Issue Type: Bug
>          Components: CSV
>         Environment: Windows, SOLR 1.2
>            Reporter: Michael Lackhoff
>         Attachments: csv_escape.patch
>
>
> A CSV-field with the contents "This is text with a \""quoted"" string" gives the error
> "invalid  char between encapsualted token end delimiter". If the backslash is not immediately before the double quote, everything is fine.
> The same error occurs when the backslash is the last character in the field (directly before the delimiter), like:
> "This is a text with a backslash \".
> Here the reason might be that the backslash also works as an escape character like in
> "This is a field with a \"quoted\" text" (no error, just the quotes in the resulting field)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.