I am parsing a csv using apache common csv but i am getting more records then it exists in csv that is due to in my csv i have some of the value containing record separator (\n) enclosed with double quotes.
https://commons.apache.org/proper/commons-csv/
Example:
test, "test
test 2",test 3, test 4
I am expecting o/p as
Record 1: test
Record 2:
test
test 2
Record 3: test 3
Record 4: test 4
But i am getting like this
Record 1: test
Record 2: test
Record 3: test 2
Record 4: test 3
Record 5: test 4
Here is the code which i am using for parsing currently.
CSVParser parser = CSVParser.parse(reader,CSVFormat.RFC4180.withFirstRecordAsHeader() .withQuote(null));
Just to add Earlier i was facing issue with having field delimiter in record field value which got resolved with .withQuote(null).
Any clue on how can we solve this?