You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2019/06/14 13:00:00 UTC
[jira] [Commented] (CSV-228) CSVParser extracts columns wrong in
case of space before quoted col name with comma
[ https://issues.apache.org/jira/browse/CSV-228?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16864034#comment-16864034 ]
Sebb commented on CSV-228:
--------------------------
According to my reading of RFC4180[1], the fields between delimiters are either either escaped or non-escaped.
non-escaped fields can include spaces, but not comma
escaped fields must start with the double-quote; leading spaces are not permitted.
So I think the current behaviour is per specification, at least for the DEFAULT/RFC4180.
[1] https://tools.ietf.org/html/rfc4180
> CSVParser extracts columns wrong in case of space before quoted col name with comma
> -----------------------------------------------------------------------------------
>
> Key: CSV-228
> URL: https://issues.apache.org/jira/browse/CSV-228
> Project: Commons CSV
> Issue Type: Bug
> Components: Parser
> Affects Versions: 1.4
> Reporter: Artemii Chugreev
> Priority: Minor
>
> CSV header is something like
> col name 1, "col name 2, with comma", col name 3
> CSVParser#getHeadersMap returns 4 columns, because of space before second column name which breaks quoting
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)