Skip to content

Commit

Permalink
use standard charset class
Browse files Browse the repository at this point in the history
  • Loading branch information
lfoppiano committed Sep 22, 2024
1 parent 5fda319 commit 21b738d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ public List<LayoutToken> fromText(final String text) {
*/
protected static void parseInputStream(InputStream in, SAXParser saxParser, DefaultHandler handler)
throws SAXException, IOException {
CharsetDecoder utf8Decoder = Charset.forName("UTF-8").newDecoder();
CharsetDecoder utf8Decoder = StandardCharsets.UTF_8.newDecoder();
utf8Decoder.onMalformedInput(CodingErrorAction.IGNORE);
utf8Decoder.onUnmappableCharacter(CodingErrorAction.IGNORE);
saxParser.parse(new InputSource(new InputStreamReader(in, utf8Decoder)), handler);
Expand Down

0 comments on commit 21b738d

Please sign in to comment.