forked from openlp/openlp
Fix not quite ascii CSVs
This commit is contained in:
parent
b99961d669
commit
250107073e
@ -186,8 +186,11 @@ class CSVBible(BibleDB):
|
|||||||
'BibleDB.Wizard', 'Importing verses from %s...',
|
'BibleDB.Wizard', 'Importing verses from %s...',
|
||||||
'Importing verses from <book name>...')) % book.name)
|
'Importing verses from <book name>...')) % book.name)
|
||||||
self.session.commit()
|
self.session.commit()
|
||||||
self.create_verse(book.id, line[1], line[2],
|
try:
|
||||||
unicode(line[3], details['encoding']))
|
verse_text = unicode(line[3], details['encoding'])
|
||||||
|
except UnicodeError:
|
||||||
|
verse_text = unicode(line[3], u'cp1252')
|
||||||
|
self.create_verse(book.id, line[1], line[2], verse_text)
|
||||||
self.wizard.incrementProgressBar(translate('BibleDB.Wizard',
|
self.wizard.incrementProgressBar(translate('BibleDB.Wizard',
|
||||||
'Importing verses... done.'))
|
'Importing verses... done.'))
|
||||||
Receiver.send_message(u'openlp_process_events')
|
Receiver.send_message(u'openlp_process_events')
|
||||||
|
Loading…
Reference in New Issue
Block a user