Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#79 CSVReader doesn't read correctly file wth multi-line entries

open
nobody
None
5
2011-10-19
2011-10-19
Anonymous
No

Please, see the file attached - it's a CSV export from the YouTrack issue tracker.
I read it as
List<String[]> lines = new CSVReader( new FileReader( f )).readAll()

I then verify that all lines read have an identical size, equal to lines[ 0 ].size() (17 for this file) which is a line of headers.
But it's not so - many lines are of size less than 17, some are of size more than 17. It seems to be related to lines with a multi-line entries which CSVReader doesn't read correctly.

You can see those 3 screenshots for more details:
http://dl.dropbox.com/u/4820835/opencsv/1.png
http://dl.dropbox.com/u/4820835/opencsv/2.png
http://dl.dropbox.com/u/4820835/opencsv/3.png

Thanks!

Discussion


  • Anonymous
    2011-10-19

     
    Last edit: Anonymous 2013-11-21
    Attachments

  • Anonymous
    2011-10-19

     
    Attachments

  • Anonymous
    2011-10-19

    It became better when I converted all multi-lines to a single String by joining them with "<br/>" but there was still a single String[] line of an unexpected size(). Please, see "issues2.zip" and those screenshots:
    * http://dl.dropbox.com/u/4820835/opencsv/4.png
    * http://dl.dropbox.com/u/4820835/opencsv/5.png

     
  • Conversion of input data is no solution. Please fix this bug.