diff options
author | Georg Brandl <georg@python.org> | 2006-04-06 10:03:32 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2006-04-06 10:03:32 (GMT) |
commit | caf9539b2b92094237b7aac4ddbafba35c58fbc1 (patch) | |
tree | 838b0b8818f96339f72446e4fa8f9d619717f1c3 /Doc | |
parent | 430947ac66a734953251d9c52e869e9774a33c59 (diff) | |
download | cpython-caf9539b2b92094237b7aac4ddbafba35c58fbc1.zip cpython-caf9539b2b92094237b7aac4ddbafba35c58fbc1.tar.gz cpython-caf9539b2b92094237b7aac4ddbafba35c58fbc1.tar.bz2 |
Bug #1465600: note encoding issue in ZipFile.write().
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/lib/libzipfile.tex | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/Doc/lib/libzipfile.tex b/Doc/lib/libzipfile.tex index 32ca3e0..4e06ef6 100644 --- a/Doc/lib/libzipfile.tex +++ b/Doc/lib/libzipfile.tex @@ -141,10 +141,17 @@ cat myzip.zip >> python.exe Write the file named \var{filename} to the archive, giving it the archive name \var{arcname} (by default, this will be the same as \var{filename}, but without a drive letter and with leading path - separators removed). If given, \var{compress_type} overrides the value - given for the \var{compression} parameter to the constructor for - the new entry. The archive must be open with mode \code{'w'} or - \code{'a'}. + separators removed). If given, \var{compress_type} overrides the + value given for the \var{compression} parameter to the constructor + for the new entry. The archive must be open with mode \code{'w'} + or \code{'a'}. + + \note{There is no official file name encoding for ZIP files. + If you have unicode file names, please convert them to byte strings + in your desired encoding before passing them to \method{write()}. + WinZip interprets all file names as encoded in CP437, also known + as DOS Latin.} + \note{Archive names should be relative to the archive root, that is, they should not start with a path separator.} \end{methoddesc} |