Tracker: Bugs

5 CSVReader doesn't read correctly file wth multi-line entries - ID: 3425997
Last Update: Comment added ( pax523 )

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!


Evgeny Goldin ( Evgeny Goldin ) - 2011-10-19 07:40:51 PDT

5

Open

None

Nobody/Anonymous

None

None

Public


Comments ( 3 )

Date: 2012-11-16 06:41:26 PST
Sender: pax523

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


Date: 2011-10-19 11:27:37 PDT
Sender: Evgeny Goldin

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



Date: 2011-10-19 07:58:43 PDT
Sender: Evgeny Goldin

Here's the script:
https://github.com/evgeny-goldin/scripts/blob/master/src/main/groovy/y2m.groovy

and a line I had to add:
https://github.com/evgeny-goldin/scripts/blob/3923ff290f461826e1e33227005080f6013ead3e/src/main/groovy/y2m.groovy#L41



Attached Files ( 2 )

Filename Description Download
issues.zip Download
issues2.zip Download

Changes ( 2 )

Field Old Value Date By
File Added 426421: issues2.zip 2011-10-19 11:25:20 PDT Evgeny Goldin
File Added 426407: issues.zip 2011-10-19 07:40:53 PDT Evgeny Goldin