You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@metamodel.apache.org by "Dennis Du Krøger (JIRA)" <ji...@apache.org> on 2017/05/26 11:03:04 UTC

[jira] [Comment Edited] (METAMODEL-1141) CSVDataContext does not support standard CSV escape

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

Dennis Du Krøger edited comment on METAMODEL-1141 at 5/26/17 11:02 AM:
-----------------------------------------------------------------------

I'll try to use the RFC4180Parser when the settings are correct for it.

I will _not_ make the proper double double-quote escape the default for now, as that means my change would probably have to wait until next major release.

I'll do that in another issue/PR combination.


was (Author: losd):
I'll try to use the RFC4180Parser when the settings are correct for it.

I will _not_ make the proper double double-quote escape the default for now, as that means my change would have to wait until next major release.

I'll do that in another issue/PR combination.

> CSVDataContext does not support standard CSV escape
> ---------------------------------------------------
>
>                 Key: METAMODEL-1141
>                 URL: https://issues.apache.org/jira/browse/METAMODEL-1141
>             Project: Apache MetaModel
>          Issue Type: Bug
>    Affects Versions: 4.5.4
>            Reporter: Dennis Du Krøger
>         Attachments: csv_doublequoteescape.csv, DoubleQuoteEscapeTest.java
>
>
> The proper way to escape a CSV is by repeating the quote character (see https://tools.ietf.org/html/rfc4180#section-2). This is also the only way that Excel and LibreOffice accepts escapes.
> While the CSVDataContext _can_ write using double quotes, it does not support reading it back.
> It's a problem with the OpenCSV parser we are using. I upgraded to 3.9 (it has changed Maven group name and Java package name to com.opencsv), and now there's a RFC4180Parser available, which should behave properly. Unfortunately, that means choosing between parsers depending on settings.
> At the same time, since we're closing at a breaking release, I'd maybe make the standards-based configuration the default. The current default doesn't seem to be compatible with anything people use.
> Attached is a test case.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)