Index: Lib/zipfile.py =================================================================== --- Lib/zipfile.py (revision 67793) +++ Lib/zipfile.py (working copy) @@ -884,6 +884,11 @@ if not pwd: raise RuntimeError, "File %s is encrypted, " \ "password required for extraction" % name + if isinstance(pwd, unicode): + if zinfo.flag_bits & 0x800: + pwd = pwd.encode('utf-8') + else: + pwd = pwd.encode('ascii') zd = _ZipDecrypter(pwd) # The first 12 bytes in the cypher stream is an encryption header