kotlin-csv
kotlin-csv copied to clipboard
Unable to parse with multiple quotes
Describe the bug trying to parse a csv record as """Permits complete"" received";;Phase 3 : 067f65dc7dc7f703229bcb7b3b21d9 , c227adc4c8ab8854dd8cc5764ce63deb1b with delimiter ',' and escape char ''
getting an error as com.github.doyaaaaaken.kotlincsv.util.CSVParseFormatException: must appear delimiter or line terminator after quote end [rowNum = 6, colIndex = 31, char = ;]
Expected behavior Expect that the csv parser reads 2 cells
- """Permits complete"" received";;Phase 3 : 067f65dc7dc7f703229bcb7b3b21d9
- c227adc4c8ab8854dd8cc5764ce63deb1b
To add to this, here is a reproducible example:
@Test
fun `test double quotes csvParser`() {
// throws exception currently
val csv = """
" ""T"" ", "t"
""".trimIndent()
csvReader().readAll(csv)
}
Edit: after code inspection this issue is unrelated to double quotes but has to do with parser not handling space between columns.