mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
HTML Input: Convert file names to ASCII as windows based software often can't handle non ASCII file names in zip files. Fixes #3693 (HTML->EPUB on Sony PRS-505 with non standard characters)
This commit is contained in:
parent
ee3be40500
commit
fb2968c8f0
@ -23,6 +23,7 @@ from calibre.customize.conversion import OptionRecommendation
|
||||
from calibre.constants import islinux
|
||||
from calibre import unicode_path
|
||||
from calibre.utils.localization import get_lang
|
||||
from calibre.utils.filenames import ascii_filename
|
||||
|
||||
class Link(object):
|
||||
'''
|
||||
@ -333,9 +334,11 @@ class HTMLInput(InputFormatPlugin):
|
||||
htmlfile_map = {}
|
||||
for f in filelist:
|
||||
path = f.path
|
||||
print 111, path, repr(path), repr(os.path.dirname(path))
|
||||
oeb.container = DirContainer(os.path.dirname(path), log)
|
||||
bname = os.path.basename(path)
|
||||
id, href = oeb.manifest.generate(id='html', href=bname)
|
||||
id, href = oeb.manifest.generate(id='html',
|
||||
href=ascii_filename(bname))
|
||||
htmlfile_map[path] = href
|
||||
item = oeb.manifest.add(id, href, 'text/html')
|
||||
item.html_input_href = bname
|
||||
|
Loading…
x
Reference in New Issue
Block a user