You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Andy Seaborne (Jira)" <ji...@apache.org> on 2021/06/15 09:14:00 UTC

[jira] [Created] (JENA-2118) Change IO.asUTF8 to map bad characters to U+FFFD not throw an exception.

Andy Seaborne created JENA-2118:
-----------------------------------

             Summary: Change IO.asUTF8 to map bad characters to U+FFFD not throw an exception.
                 Key: JENA-2118
                 URL: https://issues.apache.org/jira/browse/JENA-2118
             Project: Apache Jena
          Issue Type: Bug
    Affects Versions: Jena 4.1.0
            Reporter: Andy Seaborne
            Assignee: Andy Seaborne
             Fix For: Jena 4.2.0


`IO.asUTF8` uses an unmodified `CharsetDecoder` created from `StandardCharsets.UTF_8` passed to JDK `InputStreamReader`. It has "unmappable" set to REPORT.

But if `InputStreamReader` is passed the charset, it creates then modifies to get a `CharsetDecoder` with unmappable set to "REPLACE" (i.e. use U+FFFD, the unicode "unmappable" character.)

Change the behaviour to be "REPLACE".






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