Peter Bienstman added the comment:
> Lars Gustäbel added the comment:
>
> So, use the pax format. It stores the filenames as utf-8 and this way you
> will be on the safe side.
>
> I hope we both agree that the solution to your particular problem is
> nothing tarfile.
New submission from Peter Bienstman :
import tarfile
fname = unichr(40960) + u"a.ogg"
f = file(fname, "w")
f.write("A")
f.close()
tar_pipe = tarfile.open("test.tar", mode="w|",
format=tarfile.PAX_FORMAT)
tar_pipe.add(fname)
t
Peter Bienstman added the comment:
So what do suggest then as the best approach if I want to use unicode paths in
tar files in Python 2.x in a way that is portable across different systems?
--
___
Python tracker
<http://bugs.python.org/issue7
Peter Bienstman added the comment:
On Friday 15 January 2010 11:51:24 am Lars Gustäbel wrote:
> Lars Gustäbel added the comment:
>
> First, use a string pathname for extractall(). Most likely, your script is
> going to work. Convert all pathnames to strings using
> sys.getfil
Peter Bienstman added the comment:
On Friday 15 January 2010 02:14:30 pm Lars Gustäbel wrote:
> Lars Gustäbel added the comment:
>
> I suppose you do not have a real problem here. I thought your problem was
> that you want to use unicode pathnames as input and output to tarfile.