Skip to content

Commit

Permalink
Reuse StandardCharsets.ISO_8859_1
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Nov 6, 2024
1 parent c6449d1 commit f80f78f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ private void testChineseFileName(final String expected, final String sourceFile,
Files.copy(tempSourceFile, gos);
}
try (GzipCompressorInputStream gis = new GzipCompressorInputStream(Files.newInputStream(targetFile))) {
final byte[] fileNameBytes = gis.getMetaData().getFileName().getBytes(Charset.forName("ISO-8859-1"));
final byte[] fileNameBytes = gis.getMetaData().getFileName().getBytes(StandardCharsets.ISO_8859_1);
final String unicodeFileName = new String(fileNameBytes, fileNameCharset);
assertEquals(expected, unicodeFileName);
}
Expand Down

0 comments on commit f80f78f

Please sign in to comment.