From 1766639e3810aa66331d30a23362d90c294226c8 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 18 May 2008 19:23:03 -0700 Subject: [PATCH] IGN:... --- osx_installer.py | 1 + src/calibre/ebooks/lrf/html/convert_from.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/osx_installer.py b/osx_installer.py index 843977bf0e..672af57541 100644 --- a/osx_installer.py +++ b/osx_installer.py @@ -179,6 +179,7 @@ _check_symlinks_prescript() subprocess.check_call(['make']) files.append((os.path.abspath('pictureflow.so'), 'pictureflow.so')) subprocess.check_call(['install_name_tool', '-change', 'libpictureflow.0.dylib', '@executable_path/../Frameworks/libpictureflow.dylib', 'pictureflow.so']) + subprocess.check_call(['install_name_tool', '-change', '/System/Library/Frameworks/Python.framework/Versions/2.5/Python', '@executable_path/../Frameworks/Python.framework/Versions/2.5/Python', 'pictureflow.so']) for i in range(2): deps = BuildAPP.qt_dependencies(files[i][0]) BuildAPP.fix_qt_dependencies(files[i][0], deps) diff --git a/src/calibre/ebooks/lrf/html/convert_from.py b/src/calibre/ebooks/lrf/html/convert_from.py index 79e2490d18..f41e2276b2 100644 --- a/src/calibre/ebooks/lrf/html/convert_from.py +++ b/src/calibre/ebooks/lrf/html/convert_from.py @@ -1426,6 +1426,11 @@ class HTMLConverter(object, LoggingInterface): path = munge_paths(self.target_prefix, tag['href'])[0] ext = os.path.splitext(path)[1] if ext: ext = ext[1:].lower() + enc = sys.getfilesystemencoding() + if not enc: + enc = 'utf8' + if isinstance(path, unicode): + path = path.encode(enc, 'replace') if os.access(path, os.R_OK) and os.path.isfile(path): if ext in ['png', 'jpg', 'bmp', 'jpeg']: self.process_image(path, tag_css)