commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell (JIRA)" <j...@apache.org>
Subject [jira] Updated: (LANG-374) Add escaping for CSV columns to StringEscapeUtils
Date Thu, 27 Dec 2007 07:31:43 GMT

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

Henri Yandell updated LANG-374:
-------------------------------

    Attachment: LANG-374-unescape.patch

Attaching an unescape method. I think there's no reason not to have the symmetry.

We should avoid the generic delimiters I believe as it's too deep a path to walk down; different
escaping strategies and quoting. 

There is one odd case in the unescape method to decide upon. If the value being unescape is:

"foo.bar"

then should the unescaped version be foo.bar, or "foo.bar".

It's not a legal output from the escape method. Reversing the logic in escape() would imply
it should be "foo.bar", however if it's a different escape method being used that always wraps
in quotes, then returning foo.bar would be more helpful.

Thoughts?

The patch does the "foo.bar" return currently. 

> Add escaping for CSV columns to StringEscapeUtils
> -------------------------------------------------
>
>                 Key: LANG-374
>                 URL: https://issues.apache.org/jira/browse/LANG-374
>             Project: Commons Lang
>          Issue Type: Improvement
>    Affects Versions: 2.3
>            Reporter: Niall Pemberton
>            Assignee: Niall Pemberton
>            Priority: Minor
>             Fix For: 2.4
>
>         Attachments: Lang-374-escapeCsv-v2.patch, LANG-374-escapeDelimited.patch, LANG-374-unescape.patch,
StringEscapeUtils_v3.patch, StringEscapeUtilsTest_v3.patch
>
>
> Add escaping for CSV columns to StringEscapeUtils.
> Further information on CSV columns available here:
>     http://en.wikipedia.org/wiki/Comma-separated_values
>     http://tools.ietf.org/html/rfc4180

-- 
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