[ 
https://issues.apache.org/jira/browse/CSV-258?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gary D. Gregory closed CSV-258.
-------------------------------
    Resolution: Not A Bug

> Error on read of special characters with little endian encoding
> ---------------------------------------------------------------
>
>                 Key: CSV-258
>                 URL: https://issues.apache.org/jira/browse/CSV-258
>             Project: Commons CSV
>          Issue Type: Bug
>          Components: Parser
>    Affects Versions: 1.8
>            Reporter: Draque Thompson
>            Priority: Minor
>         Attachments: badcharacters.txt
>
>
> 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:
>  
> {quote}{{CONLANG, LOCAL}}
> {{ONE, 1}}
> {{TWO, 2}}
> {{THREE, 3}}
> {{FOURááçõ, 4}}
> {quote} # Save this file with encoding: UTF-16 Little Endian
>  # Try to parse the file with super-csv
> Here is the top stack trace I got while using it:
>  
> {quote}{{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)}}
> {quote}
> Let me know if there are any other details I can git to help!



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to