[jira] [Commented] (CSV-235) WRONG Implementation for RFC4180
[ https://issues.apache.org/jira/browse/CSV-235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16864480#comment-16864480 ] Sebb commented on CSV-235: -- RFC4180 only supports 'escaping' for the DQ character. The DQ cannot be used to escape anything else, so is not an escape character in the normal sense. > WRONG Implementation for RFC4180 > -- > > Key: CSV-235 > URL: https://issues.apache.org/jira/browse/CSV-235 > Project: Commons CSV > Issue Type: Bug > Components: Parser >Affects Versions: 1.6 >Reporter: Edward Xia >Priority: Major > > [https://tools.ietf.org/html/rfc4180#section-2] >7. If double-quotes are used to enclose fields, then a double-quote >appearing inside a field must be escaped by preceding it with >another double quote. For example: >"aaa","b""bb","ccc" > Apparently, base on a previous issue: > https://issues.apache.org/jira/browse/CSV-208, it turns out common-csv *does > not even support quote and escape to be the same character*. > RFC 4180 defines that quote and escape are both DQUOTE, however in common-csv > implementation, the default escape character is not DQUOTE, and it does not > work if changed to DQUOTE. > This means common csv is not rfc4180 compliant. > Also, I'm puzzled by the fact that someone marked CSV-208 as fixed when > nothing is fixed. Instead, it changed the behavior without documenting that > the POSTGRESQL_CSV format does not even work out of the box with the default > csv format that postgresql produces. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CSV-235) WRONG Implementation for RFC4180
[ https://issues.apache.org/jira/browse/CSV-235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16747473#comment-16747473 ] Gary Gregory commented on CSV-235: -- Hi [~exia] We welcome patches on GitHub with unit tests :) Gary > WRONG Implementation for RFC4180 > -- > > Key: CSV-235 > URL: https://issues.apache.org/jira/browse/CSV-235 > Project: Commons CSV > Issue Type: Bug > Components: Parser >Affects Versions: 1.6 >Reporter: Edward Xia >Priority: Major > > [https://tools.ietf.org/html/rfc4180#section-2] >7. If double-quotes are used to enclose fields, then a double-quote >appearing inside a field must be escaped by preceding it with >another double quote. For example: >"aaa","b""bb","ccc" > Apparently, base on a previous issue: > https://issues.apache.org/jira/browse/CSV-208, it turns out common-csv *does > not even support quote and escape to be the same character*. > RFC 4180 defines that quote and escape are both DQUOTE, however in common-csv > implementation, the default escape character is not DQUOTE, and it does not > work if changed to DQUOTE. > This means common csv is not rfc4180 compliant. > Also, I'm puzzled by the fact that someone marked CSV-208 as fixed when > nothing is fixed. Instead, it changed the behavior without documenting that > the POSTGRESQL_CSV format does not even work out of the box with the default > csv format that postgresql produces. -- This message was sent by Atlassian JIRA (v7.6.3#76005)