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

Pex fails to extract archive members with UTF-8 names on linux with non-UTF-8 default encoding. #298

Closed
jsirois opened this issue Sep 2, 2016 · 1 comment · Fixed by #2546
Assignees
Labels

Comments

@jsirois
Copy link
Member

jsirois commented Sep 2, 2016

The details of the discovery are documented over here: pantsbuild/pants#3823

The underlying condition is to be ~expected given the sys docs here: https://docs.python.org/2/library/sys.html#sys.getfilesystemencoding.

Fix this problem for zips and also tarballs if the problem is present.

@jsirois jsirois added the bug label Sep 2, 2016
@jsirois jsirois self-assigned this Sep 2, 2016
@jsirois
Copy link
Member Author

jsirois commented Sep 30, 2024

This problem is not present for tarballs. I verified using the OP from pantsbuild/pants#3823 under LANG=en_US.ISO-8859-1 which has a Cyrillic test data file name in both the zip and tarball sdists:

target = tempfile.mkdtemp()
with tarfile.open("CherryPy-7.1.0.tar.gz") as tf:
    tf.extractall(target)

jsirois added a commit to jsirois/pex that referenced this issue Sep 30, 2024
Previously, zips with non-ASCII file names could cause extraction errors
under Python 2.7 on Linux.

Fixes pex-tool#298
jsirois added a commit to jsirois/pex that referenced this issue Sep 30, 2024
Previously, zips with non-ASCII file names could cause extraction errors
under Python 2.7 on Linux.

Fixes pex-tool#298
@jsirois jsirois closed this as completed in f28046b Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant