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.
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
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
___
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
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
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
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
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?
--
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
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
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20329
___
___
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.
12 matches
Mail list logo