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/24 13:36:04 UTC

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

Dennis Du Krøger created METAMODEL-1141:
-------------------------------------------

             Summary: 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)