#68 ignoreLeadingWhiteSpace ; "";

open
nobody
None
5
2011-05-13
2011-05-13
Lars Bohl
No

Parse the following line:

foo; "";bar

("foo", semicolon, space, double quotes, double quotes, semicolon, "bar")

with a CSVReader(in, ';', '"', (char) 3, 0, false, true)

You will get:

["foo", "\"", "bar"]

(not an empty string, as expected, but a string consisting of a literal double quote)

Sorry guys it's friday night, I don't have access to my work code at home and I'm too lazy to write a unit test or complete code now. Hope you can reproduce anyway. Using opencsv 2.3 by the way (downloaded tar.gz with sources and built it with maven, oh and I remember a failing unit test so I had to skip the tests) Very useful project btw, keep it up, kthxbye

Discussion

  • Lars Bohl
    Lars Bohl
    2011-05-13

    btw I meant a CSVReader constructor (so many of them) that sets separator to ';' and ignoreLeadingWhiteSpace to true