[
https://issues.apache.org/jira/browse/COMPRESS-638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17677398#comment-17677398
]
Gary D. Gregory commented on COMPRESS-638:
------------------------------------------
Note: I added
{{org.apache.commons.compress.compressors.gzip.GzipCompressorOutputStreamTest}}.
I don't think we can do anything that will be interoperable with all of the
gzip utilities out in the world.
Even if we convert non-ISO-8859-1-encodable file names to _something_ that _we_
can convert back ourselves, that will look odd elsewhere.
For example, we could encode "测试中文名称.xml"/"Test Chinese name.xml" to
"\u6D4B\u8BD5\u4E2D\u6587\u540D\u79F0.xml"
> 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)