Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Not A Bug
-
1.8
-
None
-
None
Description
Under certain scenarios, super-csv will blow up when consuming special characters. To make this error appear:
- Copy/paste the following CSV data into an empty file:
# Save this file with encoding: UTF-16 Little EndianCONLANG, LOCAL
ONE, 1
TWO, 2
THREE, 3
FOURááçõ, 4
- Try to parse the file with super-csv
Here is the top stack trace I got while using it:
{{MalformedInputException reading next record: java.nio.charset.MalformedInputException: Input length = 1-java.lang.IllegalStateException
java.nio.charset.MalformedInputException: Input length = 1
at java.base/java.nio.charset.CoderResult.throwException(CoderResult.java:274)
at java.base/sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:352)
at java.base/sun.nio.cs.StreamDecoder.read(StreamDecoder.java:188)
at java.base/java.io.InputStreamReader.read(InputStreamReader.java:181)
at java.base/java.io.BufferedReader.read1(BufferedReader.java:210)
at java.base/java.io.BufferedReader.read(BufferedReader.java:287)
at java.base/java.io.BufferedReader.fill(BufferedReader.java:161)
at java.base/java.io.BufferedReader.read(BufferedReader.java:182)
at org.apache.commons.csv.ExtendedBufferedReader.read(ExtendedBufferedReader.java:58)
at org.apache.commons.csv.Lexer.nextToken(Lexer.java:95)
at org.apache.commons.csv.CSVParser.nextRecord(CSVParser.java:664)
at org.apache.commons.csv.CSVParser$CSVRecordIterator.getNextRecord(CSVParser.java:142)
at org.apache.commons.csv.CSVParser$CSVRecordIterator.hasNext(CSVParser.java:155)}}
Let me know if there are any other details I can git to help!