openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #01898
Re: [Merge] lp:~m2j/openlp/work into lp:openlp
Review: Approve approve
Just a tip:
The "chardet" module (already required by OpenLP) can detect the encoding of a blob of text. See the Bible and Song plugins.
try:
file_handle = open(text_file, u'r')
content = file_handle.read()
content_string = content.decode(u'utf-8')
except (IOError, UnicodeError):
log.exception(u'Failed to open text file %s' % text_file)
--
https://code.launchpad.net/~m2j/openlp/work/+merge/27989
Your team OpenLP Core is subscribed to branch lp:openlp.
References