commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anirudha Khanna (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CSV-58) Escape handling needs rethinking
Date Tue, 26 Jun 2012 05:24:43 GMT

    [ https://issues.apache.org/jira/browse/CSV-58?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13401180#comment-13401180
] 

Anirudha Khanna commented on CSV-58:
------------------------------------

I came across a concrete use case for rethinking the escape handling in Commons CSV. MySQL
out format represents NULL as \N. This is a special character that should be retained as is.
In this regard, I have made an attempt to modify the escape handling in the Commons CSV parser.
I have not made corresponding changes to CSV writer and will submit a patch in that regards
soon to. Looking forward to thoughts.
                
> Escape handling needs rethinking
> --------------------------------
>
>                 Key: CSV-58
>                 URL: https://issues.apache.org/jira/browse/CSV-58
>             Project: Commons CSV
>          Issue Type: Bug
>          Components: Parser
>            Reporter: Sebb
>             Fix For: 1.0
>
>
> The current escape parsing converts <esc><char> to plain <char> if
the <char> is not one of the special characters to be escaped.
> This can affect unicode escapes if the <esc> character is backslash.
> One way round this is to specifically check for <char> == 'u', but it seems wrong
to only do this for 'u'.
> Another solution would be to leave <esc><char> as is unless the <char>
is one of the special characters.
> There are several possible ways to treat unrecognised escapes:
> - treat it as if the escape char had not been present (current behaviour)
> - leave the escape char as is
> - throw an exception

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message