Description
a simple but strange problem
the csv file is like
and the parse code is
File csv = new File("src/main/resources/test.csv"); CSVFormat format = CSVFormat.Builder.create() .setDelimiter("||") .setRecordSeparator("\n") .build(); Iterable<CSVRecord> records = format.parse(new FileReader(csv)); for (CSVRecord record : records) { System.out.println(record); }
the output should be
YW-20210402-Z3N9X
0
13500900001|*|{"name":"Mr.Chen13500900001"}
but I get the wrong result
if I add a space after the 0 like this
I can get the result I want
if I change the number >=10 without a space it works just fine
Hope I can get reply from you, thx!