commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacopo Cappellato (JIRA)" <j...@apache.org>
Subject [jira] Commented: (SANDBOX-161) CSVPrinter#escapeAndQuote(String) doesn't adhere to CSV standard
Date Sat, 29 Jan 2011 07:42:43 GMT

    [ https://issues.apache.org/jira/browse/SANDBOX-161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12988414#action_12988414
] 

Jacopo Cappellato commented on SANDBOX-161:
-------------------------------------------

I have reviewed this issue, the patch attached to it and the code in the trunk; it seems that
all the issues reported here have been already addressed and fixed in the trunk.
Here are some details:
* "encapsulatorEscapeChar" is already in the trunk with name "escape"
* in CSVPrinter escapeAndQuote has been replaced by printAndEscape and printAndEncapsulate
and the new methods are based on CSVStrategy

Based on this, in my opinion this Jira ticket can be closed; there are some minor fixes (fixes
for typos, suppression of a warning messaged for the usage of a deprecated constructor) that
are still valid, but I am going to provide a new patch for these (and others) minor issues
in another Jira ticket.


> CSVPrinter#escapeAndQuote(String) doesn't adhere to CSV standard
> ----------------------------------------------------------------
>
>                 Key: SANDBOX-161
>                 URL: https://issues.apache.org/jira/browse/SANDBOX-161
>             Project: Commons Sandbox
>          Issue Type: Bug
>          Components: CSV
>    Affects Versions: Nightly Builds
>            Reporter: Daniel Gredler
>             Fix For: CSV 1.0
>
>         Attachments: commons-csv-patch-standard-escaping.txt
>
>
> All the descriptions of the CSV format that I've seen state that:
> - Double quotes (") are escaped using two double quotes (""), rather than a backslash
(\").
> - Embedded line breaks are allowed and don't need to be escaped... just enclose the field
in double quotes.
> - Because backslashes are not used to escape double quotes or line breaks, the backslashes
themselves do not need to be escaped.
> CSVPrinter#escapeAndQuote(String) breaks these rules. Why?
> http://www.creativyst.com/Doc/Articles/CSV/CSV01.htm
> http://en.wikipedia.org/wiki/Comma-separated_values

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


Mime
View raw message