[ https://issues.apache.org/jira/browse/COMPRESS-638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17656390#comment-17656390 ]
Gary D. Gregory edited comment on COMPRESS-638 at 1/10/23 3:03 AM: ------------------------------------------------------------------- Looks like no: "If FNAME is set, an original file name is present, terminated by a zero byte. The name must consist of ISO 8859-1 (LATIN-1) characters; on operating systems using EBCDIC or any other character set for file names, the name must be translated to the ISO LATIN-1 character set." >From [https://www.ietf.org/rfc/rfc1952.txt] Do you have other sources that indicate otherwise? was (Author: garydgregory): Looks like no: "If FNAME is set, an original file name is present, terminated by a zero byte. The name must consist of ISO 8859-1 (LATIN-1) characters; on operating systems using EBCDIC or any other character set for file names, the name must be translated to the ISO LATIN-1 character set." >From [https://www.ietf.org/rfc/rfc1952.txt] Do you have other sources that indicate otherwise? > The GzipCompressorOutputStream#writeHeader method uses the ISO_8859_1 to > write the file name. If the file name contains non-ISO_8859_1 characters, > some unknown characters are displayed after decompression. > -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: COMPRESS-638 > URL: https://issues.apache.org/jira/browse/COMPRESS-638 > Project: Commons Compress > Issue Type: Bug > Reporter: Radar wen > Priority: Major > Attachments: 0110.png > > > The GzipCompressorOutputStream#writeHeader method uses the ISO_8859_1 to > write the file name. > If the file name contains non-ISO_8859_1 characters, some unknown characters > are displayed after decompression. !0110.png! > Can change the ISO_8859_1 to UTF-8? > if (filename != null) { > out.write(filename.getBytes(ISO_8859_1)); > out.write(0); > } > > -- This message was sent by Atlassian Jira (v8.20.10#820010)