Author Laurent.Mazuel
Recipients Laurent.Mazuel, r.david.murray, serhiy.storchaka, vstinner
Date 2014-01-22.07:39:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1390376373.04.0.990904120739.issue20329@psf.upfronthosting.co.za>
In-reply-to
Content
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. If you transcode filename using the current locale, unzipping twice the same file with two different locales will lead to two different files, which is not (I think) you are intending for.
The problem will not arise in Windows (NTFS is UTF-16) nor MAC OSX (UTF-8)

Moreover, a simple "unzip" works like a charm. It doesn't care about encoding or current locale and extract the file using the initial bytes in the zip. Unzipping twice with the two different locales creates only one file.

An interesting link (even if it is not an official reference):
http://unix.stackexchange.com/questions/2089/what-charset-encoding-is-used-for-filenames-and-paths-on-linux
History
Date User Action Args
2014-01-22 07:39:33Laurent.Mazuelsetrecipients: + Laurent.Mazuel, vstinner, r.david.murray, serhiy.storchaka
2014-01-22 07:39:33Laurent.Mazuelsetmessageid: <1390376373.04.0.990904120739.issue20329@psf.upfronthosting.co.za>
2014-01-22 07:39:33Laurent.Mazuellinkissue20329 messages
2014-01-22 07:39:32Laurent.Mazuelcreate