[issue11160] ZipFile.comment expects bytes

2022-03-19 Thread Irit Katriel
Irit Katriel added the comment: The documentation has been updated by now [1]: ZipFile.comment The comment associated with the ZIP file as a bytes object. If assigning a comment to a ZipFile instance created with mode 'w', 'x' or 'a', it should be no longer than 65535 bytes. Comments longer

[issue11160] ZipFile.comment expects bytes

2012-10-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The ZIP specification says: """ If general purpose bit 11 is unset, the file name and comment should conform to the original ZIP character encoding. If general purpose bit 11 is set, the filename and comment must support The Unicode Standard, Version 4.1.0

[issue11160] ZipFile.comment expects bytes

2011-02-13 Thread STINNER Victor
STINNER Victor added the comment: > can we use str.encode() function to convert string into bytes ? Can you try different ZIP archivers to check which encoding is expected? WinZip, WinRAR, 7-zip, "zip" command line program on Linux, etc. And do you have any reference into a ZIP documentation?

[issue11160] ZipFile.comment expects bytes

2011-02-12 Thread yeswanth
yeswanth added the comment: can we use str.encode() function to convert string into bytes ? -- ___ Python tracker ___ ___ Python-bugs

[issue11160] ZipFile.comment expects bytes

2011-02-12 Thread yeswanth
yeswanth added the comment: IMO the Zipfile.comment should accept strings too instead of just accepting bytes , so patching should help i guess -- nosy: +swamiyeswanth ___ Python tracker _

[issue11160] ZipFile.comment expects bytes

2011-02-09 Thread Xuanji Li
New submission from Xuanji Li : The documentation for zipfile describes ZipFile.comment as "The comment text associated with the ZIP file." From reading this I expect that setting it to a string is ok; however ZipFile.comment must actually be set to bytes (or a bytes-like object, I am not very