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 using POSIX as the locale, will fail a lot.  If you 
use a sensible modern locale that includes utf-8, you wouldn't have a problem.

Unfortunately, the reality is probably that sometimes you want one behavior and 
sometimes you want the other :(

Encoding using member.encoding is probably wrong, though.  If you are trying to 
preserve the original bytes, is is probably best do so, and not assume that the 
tarfile encoding field is valid.

I'm adding Victor Stinner to nosy: he's thought about these issues much more 
deeply than I have.  The answer may be that we will only support transcoding 
filenames in our tarfile module...and certainly it looks like doing anything 
else, even if we want to, would be a new feature.

----------
nosy: +haypo, r.david.murray

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue20329>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to