Apache CSV:使用分隔符解析引用的数据

时间:2017-12-23 18:32:59

标签: java apache-commons-csv

我有这样的CSV数据(完全引用,逗号分隔,记录以';'结尾:

"595010","MHD-10 SKIBUS Usti n.L., Divadlo - Telnice, Zadni Telnice","25013891","A","A","0","0","0","0","","","","","23122017","11032018","1","1";

我将Apache CSV解析器配置为:

CSVFormat.newFormat(',')
    .withQuoteMode(QuoteMode.ALL)
    .withQuote('\"')!!
    .withRecordSeparator(';')

但是当我试图解析它时,我收到错误

java.lang.IllegalStateException: IOException reading next record: java.io.IOException: (line 1) invalid char between encapsulated token and delimiter

解析器处理';'时。 我究竟做错了什么? 谢谢你的回答

0 个答案:

没有答案