Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly set header fields in ZipArchiveOutputStream #2738

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

npaige
Copy link
Contributor

@npaige npaige commented Apr 11, 2024

File names are written in UTF-8, so bit 11 (language encoding flag) of the general purpose bit flag must be set in both local file headers and central directory entries.

Other zip implementations (e.g. zipinfo, or python's zipfile library) also require other header fields (version requried to extract, version made by) to be set to reasonable values in order to correctly interpret UTF-8 names, so set these as well.

Also set file permissions in the 'external file attributes' central directory entry field to rw-r--r--.

File names are written in UTF-8, so bit 11 (language encoding flag) of
the general purpose bit flag must be set in both local file headers and
central directory entries.

Other zip implementations (e.g. zipinfo, or python's zipfile library)
also require other header fields (version requried to extract, version
made by) to be set to reasonable values in order to correctly interpret
UTF-8 names, so set these as well.

Also set file permissions in the 'external file attributes' central
directory entry field to rw-r--r--.
File names are written in UTF-8, so bit 11 (language encoding flag) of
the general purpose bit flag must be set in both local file headers and
central directory entries.

Other zip implementations (e.g. zipinfo, or python's zipfile library)
also require other header fields (version requried to extract, version
made by) to be set to reasonable values in order to correctly interpret
UTF-8 names, so set these as well.

Also set file permissions in the 'external file attributes' central
directory entry field to -rw-r--r-- for files and drwxr-xr-x for
directories..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants