我有一个 CSV 文件,其中一个标题看起来像 Name;Lastname;"Some info\n more info"
我的解析器:
CsvMapper csvMapper = new CsvMapper();
CsvSchema csvSchema = CsvSchema.emptySchema()
.withHeader()
.withColumnSeparator(';');
MappingIterator<Map<String, String>> mappingIterator = csvMapper
.readerFor(Map.class)
.with(csvSchema)
.readValues(new InputStreamReader(
new FileInputStream("myFilePath"),
Charset.forName("windows-1250")
));
但是解析后,我丢失了标题中的引号并得到了Name;Lastname;Some info\n more info
. 如何保存报价?