mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Book container: Fix handling of non-ascii chars in filenames
This commit is contained in:
parent
e360e989cf
commit
93c872e8f3
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user