-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
patch for bug 1170311 "zipfile UnicodeDecodeError" #45077
Comments
This patch fixes UnicodeDecodeError when attempting to write files to zipfile with filename of unicode class. |
This patch is incorrect. It relies on the system encoding, and allows non-string things as file names. What it really should do is to encode in code page 437; bonus points if it falls back to the UTF-8 feature of zip files when that encoding fails. |
File Added: python-zipfile-unicode-filenames-utf8.patch |
File Added: python-zipfile-unicode-filenames-utf8-2.patch |
File Added: python-zipfile-unicode-filenames-utf8-3.patch |
Any chance of this making it in sometime? |
I'll see what I can do for 2.6, but perhaps it gets delayed until |
Thanks for the patch, committed as r62724. I didn't see the need to |
Martin, I cleared the flag bit because filename was changed in-place, to I suggest that if users want to know if filename is unicode, they should |
I'm not concerned about the compatibility; code that actually does the I am concerned about silently faking data. The library shouldn't do
That won't work in Py3k, which will always decode the filename. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: