Skip to content

A blank string "" is misinterpreted, when it occurs at the beginning of a line #7

@GoogleCodeExporter

Description

@GoogleCodeExporter
When a CSV file contains an empty string "" as the first data item in a row, 
the CSVReader will read the character '"'. When the same string occurs as the 
second data item in a row, the CSVReader will read the empty String.

The problem has nothing to do with the file system, since it also occurs, when 
the input comes from a StringReader.

What steps will reproduce the problem?
--------------------------------------
1. Modify the attached JUnit test so that it finds the attached CSV file.
2. Run the test.
3. Inspect the output.

What is the expected output? What do you see instead?
-----------------------------------------------------
The expected output from the first unit test is
[/UN/Nicht_zugeordnet/3201902/1.1, /UN/Nicht_zugeordnet/3201902/1.2, 
/UN/Nicht_zugeordnet/3201902/1.3]
[3175,44, 2206,44, 5381,88]
[, , ]

Instead I see 
[/UN/Nicht_zugeordnet/3201902/1.1, /UN/Nicht_zugeordnet/3201902/1.2, 
/UN/Nicht_zugeordnet/3201902/1.3]
[3175,44, 2206,44, 5381,88]
[", , ]

The expected output from the second unit test is
[A, B, C]
[1, 2, 3]
[, , ]

Instead I see
[A, B, C]
[1, 2, 3]
[", , ]


What version of the product are you using? On what operating system?
It happens with both versions 2.3 and 2.4
The operating system is Windows 7.

Please provide any additional information below.

"A";"B";"C"
"3175,44";"2206,44";"5381,88"
"";"";""

Original issue reported on code.google.com by [email protected] on 20 Jun 2014 at 10:55

Attachments:

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions