Issue #1734346: Support Unicode file names for zipfiles.
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index b092bd9..d8d6590 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -1,6 +1,6 @@
#! /usr/bin/env python
-"""Regression test.
+"""Regression test driver.
This will find all modules whose name is "test_*" in the test
directory, and run them. Various command line options provide
diff --git a/Lib/test/test_zipfile.py b/Lib/test/test_zipfile.py
index 082b918..ace5a88 100644
--- a/Lib/test/test_zipfile.py
+++ b/Lib/test/test_zipfile.py
@@ -553,6 +553,15 @@
class OtherTests(unittest.TestCase):
+ def testUnicodeFilenames(self):
+ zf = zipfile.ZipFile(TESTFN, "w")
+ zf.writestr(u"foo.txt", "Test for unicode filename")
+ zf.writestr(u"fo\xf6.txt", "Test for unicode filename")
+ assert isinstance(zf.infolist()[0].filename, unicode)
+ zf.close()
+ zf = zipfile.ZipFile(TESTFN, "w")
+
+
def testCreateNonExistentFileForAppend(self):
if os.path.exists(TESTFN):
os.unlink(TESTFN)