Note There is no official file name encoding for ZIP files. If you have unicode file names, you must convert them to byte strings in your desired encoding before passing them to write(). WinZip interprets all file names as encoded in CP437, also known as DOS Latin.
UNICODE文字列に起因する問題 (スコア:3, 参考になる)
zipファイル形式の圧縮/伸張ライブラリzipfile.ZipFileで、ファイル名エンコーディングがUTF-8決めうちになってしまったようです。
従来のzipfile.ZipFile.writeは、zipに格納されるファイル名に8ビット文字列をそのまま使っていたため、エンコーディングを自分で選ぶことができました。
(とゆーか、ライブラリ側が関知するところではなかった(^^;))
しかし、Python3.0からはUNICODE文字列で与える形式となり、かつ今のところエンコーディングを変更することはできないみたい。
Re: (スコア:0)
Note
There is no official file name encoding for ZIP files. If you have unicode file names, you must convert them to byte strings in your desired encoding before passing them to write(). WinZip interprets all file names as encoded in CP437, also known as DOS Latin.
って書いてあるけど、これってファイルネームを自分でエンコードしたbytesで渡せってことだよね。
未確認だけどこれでできないの?
Re:UNICODE文字列に起因する問題 (スコア:0)