Book container: Fix handling of non-ascii chars in filenames

This commit is contained in:
Kovid Goyal 2013-10-22 10:47:11 +05:30
parent e360e989cf
commit 93c872e8f3
2 changed files with 2 additions and 3 deletions

View File

@ -10,7 +10,6 @@ __docformat__ = 'restructuredtext en'
import os, logging, sys, hashlib, uuid, re, shutil
from collections import defaultdict
from io import BytesIO
from urllib import unquote as urlunquote, quote as urlquote
from urlparse import urlparse
from future_builtins import zip
@ -29,7 +28,7 @@ from calibre.ebooks.mobi.reader.headers import MetadataHeader
from calibre.ebooks.mobi.tweak import set_cover
from calibre.ebooks.oeb.base import (
serialize, OEB_DOCS, _css_logger, OEB_STYLES, OPF2_NS, DC11_NS, OPF,
rewrite_links, iterlinks, itercsslinks)
rewrite_links, iterlinks, itercsslinks, urlquote, urlunquote)
from calibre.ebooks.oeb.polish.errors import InvalidBook, DRMError
from calibre.ebooks.oeb.parse_utils import NotHTML, parse_html, RECOVER_PARSER
from calibre.ptempfile import PersistentTemporaryDirectory, PersistentTemporaryFile

View File

@ -149,7 +149,7 @@ class ContainerTests(BaseTest):
# Test renaming of text files
c = new_container()
rename_files(c, {'index_split_000.html':'text/page one.html', 'index_split_001.html':'text/page two.html'})
rename_files(c, {'index_split_000.html':'text/page one fällen.html', 'index_split_001.html':'text/page two fällen.html'})
self.check_links(c)
# self.run_external_tools(c, gvim=True)