#19 Parse within a quoted field

v1.0 (example)
closed
nobody
None
5
2016-04-27
2011-06-22
Anonymous
No

Hi...

Is there any workaround for making the CSVReader process the "inside" part of a quoted string?

Such an option would be very useful, since there are CSV outputs in which all the line is enclosed within quotes and the actual content lies within these quotes.

A typical example for the default quote character \", would be

"This, is, a, line"
"Second, line, like, that"
"Third, and, similar, line"
"Yet, another, line, likewise"

If I instantiate the CVSReader with the default quote character, only 1 field is produced (i.e., the entire contents of each quoted line).

If I use any other character as the quote character, then parsing does happen as expected, however the first field also includes the quote character and the last, too, like

"This
"Second
"Third
"Yet

and

line"
that"
line"
likewise"

I can do String post-processing, but this is not the most elegant solution. An option like the CSVWriter.NO_QUOTE_CHARACTER would solve this.

Discussion

  • Andrew Rucker Jones

    • status: open --> closed
    • Group: --> v1.0 (example)
     
  • Andrew Rucker Jones

    Cleaning up old issues. If this still needs attention, please open a new ticket.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks