Message222553
IIRC, tarfile under 2.7 has never been explicitly unicode-safe, support for unicode objects is heterogeneous at best. The obvious work-around is to work exclusively with str objects.
What we can't do is to decode the utf-8 pathname from the archive to a unicode object, because we have no way to detect an archive's encoding. We can either emit a warning if the user passes a unicode object to extract() or we implicitly encode the passed unicode object using TarFile.encoding, so that the os.path.join() succeeds.
Unfortunately, I am not entirely sure if there was possibly a rationale behind the current behaviour of extract(). This needs more inspection. |
|
Date |
User |
Action |
Args |
2014-07-08 10:40:12 | lars.gustaebel | set | recipients:
+ lars.gustaebel, vinay.sajip, ezio.melotti, BreamoreBoy, hynek |
2014-07-08 10:40:12 | lars.gustaebel | set | messageid: <1404816012.41.0.932157710788.issue17153@psf.upfronthosting.co.za> |
2014-07-08 10:40:12 | lars.gustaebel | link | issue17153 messages |
2014-07-08 10:40:11 | lars.gustaebel | create | |
|