Open dportabella opened 8 years ago
Note: the previous example works as expected using the apache commons CSV parser:
org.apache.commons.csv.CSVParser.parse(
new File(file),
StandardCharsets.UTF_8,
CSVFormat.DEFAULT.withIgnoreSurroundingSpaces(true))
+1 On this
I have this input:
aa, "bb,cc", dd
and I expect this list:Using the
DefaultCSVFormat
, this input fails withMalformedCSVException
.using this formatter:
then I get this list:
so, the parsing is invalid when a delimiter is inside a quote. also, it should ignore spaces between fields.