Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.12.1, 1.13.2
-
None
Description
There is a little inconsistency of quoting and trimming when the value separator is present in the data and using Apache Common CSV parser.
Example:
case, A, B quoted value,"aa", quoted and trimmed value, "aa" , quoted value with comma,"a,a", trimmed but wrongly unquoted value with comma, "a,a" ,
here in the 3 first cases, the value is correctly parsed
A : "aa", B : null
A : "aa", B : null
A : "a,a", B : null
so using separately quoting containing the value separator or spaces to trim works well.
However in the last example that combine quoted value separator and outer spaces to trim, then quoting fails
A : "\"a", B : "a\""
I think setting org.apache.commons.csv.CSVFormat.withIgnoreSurroundingSpaces(true) on the CSV parser would solve the issue, but I don't see the whole picture to tell if this would have other side effects.
Attachments
Attachments
Issue Links
- links to