diff --git a/openlp/plugins/songs/lib/__init__.py b/openlp/plugins/songs/lib/__init__.py index 662172374..7686137fb 100644 --- a/openlp/plugins/songs/lib/__init__.py +++ b/openlp/plugins/songs/lib/__init__.py @@ -512,10 +512,13 @@ def strip_rtf(text, default_encoding=None): elif not ignorable: ebytes.append(int(hex_, 16)) elif tchar: - if curskip > 0: - curskip -= 1 - elif not ignorable: + if not ignorable: ebytes += tchar.encode() + if len(ebytes) >= curskip: + ebytes = ebytes[curskip:] + else: + curskip -= len(ebytes) + ebytes = "" text = ''.join(out) return text, default_encoding diff --git a/openlp/plugins/songs/lib/importers/easyworship.py b/openlp/plugins/songs/lib/importers/easyworship.py index e462e34df..72585b703 100644 --- a/openlp/plugins/songs/lib/importers/easyworship.py +++ b/openlp/plugins/songs/lib/importers/easyworship.py @@ -341,6 +341,9 @@ class EasyWorshipSongImport(SongImport): self.memo_file.close() def import_sqlite_db(self): + """ + Import the songs from an EasyWorship 6 SQLite database + """ # get database handles songs_conn = sqlite3.connect(self.import_source + "/Databases/Data/Songs.db") words_conn = sqlite3.connect(self.import_source + "/Databases/Data/SongWords.db")