openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #10718
[Merge] lp:~raoul-snyman/openlp/bug-803031 into lp:openlp
Raoul Snyman has proposed merging lp:~raoul-snyman/openlp/bug-803031 into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
For more details, see:
https://code.launchpad.net/~raoul-snyman/openlp/bug-803031/+merge/67280
Fixed bug #803031 by trying the standard Windows codepage if UTF-8 decoding of the Bible books page fails.
--
https://code.launchpad.net/~raoul-snyman/openlp/bug-803031/+merge/67280
Your team OpenLP Core is requested to review the proposed merge of lp:~raoul-snyman/openlp/bug-803031 into lp:openlp.
=== modified file 'openlp/plugins/bibles/lib/http.py'
--- openlp/plugins/bibles/lib/http.py 2011-06-12 16:02:52 +0000
+++ openlp/plugins/bibles/lib/http.py 2011-07-08 06:21:40 +0000
@@ -147,7 +147,10 @@
send_error_message(u'download')
return None
page_source = page.read()
- page_source = unicode(page_source, 'utf8')
+ try:
+ page_source = unicode(page_source, u'utf8')
+ except UnicodeDecodeError:
+ page_source = unicode(page_source, u'cp1251')
page_source_temp = re.search(u'<table .*?class="infotable".*?>.*?'\
u'</table>', page_source, re.DOTALL)
if page_source_temp:
Follow ups