Fix #2175 (Error when trying to open ebook viewer)

This commit is contained in:
Kovid Goyal 2009-03-29 10:37:30 -07:00
parent 0b345b8562
commit 411c397bed

View File

@ -368,7 +368,7 @@ class DocumentView(QWebView):
def load_path(self, path, pos=0.0):
self.initial_pos = pos
html = open(path, 'rb').read().decode(path.encoding)
html = open(path, 'rb').read().decode(path.encoding, 'replace')
html = EntityDeclarationProcessor(html).processed_html
self.setHtml(html, QUrl.fromLocalFile(path))