[issue20329] zipfile.extractall fails in Posix shell with utf-8 filename

2017-12-18 Thread STINNER Victor
STINNER Victor added the comment: > I don't think that we can fix this bug, sadly. But I'm happy to see that the > PEP 538 and PEP 540 are already useful! Oops, I mean "we cannot *close* this bug" (right now). Sorry. I mean that IMHO we still have to fix the bug.

[issue20329] zipfile.extractall fails in Posix shell with utf-8 filename

2017-12-14 Thread STINNER Victor
STINNER Victor added the comment: > I created an environment under 3.3.1 in which this error was still occurring, > but within that same environment, it is not occurring for 3.7. I believe > this can be closed. Python 3.7 now uses the UTF-8 encoding when the

[issue20329] zipfile.extractall fails in Posix shell with utf-8 filename

2017-12-14 Thread Cheryl Sabella
Cheryl Sabella added the comment: I created an environment under 3.3.1 in which this error was still occurring, but within that same environment, it is not occurring for 3.7. I believe this can be closed. -- nosy: +csabella ___

[issue20329] zipfile.extractall fails in Posix shell with utf-8 filename

2014-02-27 Thread Laurent Mazuel
Laurent Mazuel added the comment: Thank for your answer. Unfortunately, I cannot test easily python 3.4 for now. But I have downloaded the source code and diff from 3.3 to 3.4 the zipfile module and see no difference relating to this problem. I can be wrong, maybe if some core improvement of

[issue20329] zipfile.extractall fails in Posix shell with utf-8 filename

2014-01-22 Thread R. David Murray
R. David Murray added the comment: Believe me, we are *well* aware of the issue that linux stores filenames as bytes. I agree that the inability to always transcode is an issue. That's why I'd like the opinion of someone who has studied this problem in more depth. -- nosy: +ncoghlan

[issue20329] zipfile.extractall fails in Posix shell with utf-8 filename

2014-01-22 Thread Nick Coghlan
Nick Coghlan added the comment: The POSIX locale tells Python 3 to use ASCII for all operating system interfaces, including the standard streams. This is an antiquated behaviour in the POSIX spec that Python 3 doesn't currently work around. Issue 19977 is a proposal to work around this

[issue20329] zipfile.extractall fails in Posix shell with utf-8 filename

2014-01-22 Thread Nick Coghlan
Changes by Nick Coghlan ncogh...@gmail.com: -- superseder: Use surrogateescape error handler for sys.stdin and sys.stdout on UNIX for the C locale - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20329

[issue20329] zipfile.extractall fails in Posix shell with utf-8 filename

2014-01-22 Thread Nick Coghlan
Nick Coghlan added the comment: My apologies, I completely misread the issue and thought it was related to displaying file names, rather than opening them. I believe Python 3.4 includes some changes in this area - are you in a position to retry this on the latest 3.4 beta release? --

[issue20329] zipfile.extractall fails in Posix shell with utf-8 filename

2014-01-21 Thread Laurent Mazuel
New submission from Laurent Mazuel: Hello, Considering a zip file which contains utf-8 filenames (as uploaded zip file), the following code fails if launched in a Posix shell. with zipfile.ZipFile(test_ut8.zip) as fd: ... fd.extractall() ... Traceback (most recent call last): File

[issue20329] zipfile.extractall fails in Posix shell with utf-8 filename

2014-01-21 Thread R. David Murray
R. David Murray added the comment: If you live in a current-posix world, this might make sense. However, one can also argue that the filename should be *transcoded* from the tarfile encoding to the local FS filename encoding, which I believe is what we are currently doing. Which, if you are

[issue20329] zipfile.extractall fails in Posix shell with utf-8 filename

2014-01-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20329 ___ ___

[issue20329] zipfile.extractall fails in Posix shell with utf-8 filename

2014-01-21 Thread Laurent Mazuel
Laurent Mazuel added the comment: Thanks for your answer. I think you can't transcode internal zip filenames to FS encoding. Actually, in Unix the FS only stores bytes for filename, there is no FS encoding. Then, if you change your locale, the filename printed will change too in your console.