Commits

Anonymous committed 0b85270

Fix UnicodeError for unicode filenames while writing the zipfile.

  • Participants
  • Parent commits c762a15

Comments (0)

Files changed (1)

sphinx/builders/epub.py

         epub.write(path.join(outdir, 'mimetype'), 'mimetype', \
             zipfile.ZIP_STORED)
         for file in projectfiles:
+            if isinstance(file, unicode):
+                file = file.encode('utf-8')
             epub.write(path.join(outdir, file), file, zipfile.ZIP_DEFLATED)
         epub.close()