ppkarwasz commented on PR #602: URL: https://github.com/apache/commons-compress/pull/602#issuecomment-2458937063
> Do you have a link to the Gzip specification that define that non-ASCII bytes are allowed? According to [RFC 1952](https://datatracker.ietf.org/doc/html/rfc1952#page-7): > 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. In practice utilities like GNU Gzip (see [`zip.c`](https://git.savannah.gnu.org/cgit/gzip.git/tree/zip.c)) do not care about that and put whatever sequence of bytes the filesystem uses. Anyway it doesn't matter, because by default the original file name is not restored (unless we have a filesystem that truncates file names). Currently Commons Compress respects RFC 1952 and coerces file names to ISO 8859-1, but I guess we could introduce an option that uses `UTF-8` instead. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
