diff --git a/openlp/core/lib/songxmlhandler.py b/openlp/core/lib/songxmlhandler.py index 4543464bb..37bbe25e4 100644 --- a/openlp/core/lib/songxmlhandler.py +++ b/openlp/core/lib/songxmlhandler.py @@ -134,7 +134,8 @@ class SongXMLParser(object): The XML of the song to be parsed. """ try: - self.song_xml = ElementTree(element=XML(xml)) + self.song_xml = ElementTree( + element=XML(unicode(xml).encode('unicode-escape'))) except: log.exception(u'Invalid xml %s', xml) @@ -147,7 +148,8 @@ class SongXMLParser(object): verse_list = [] for element in iter: if element.tag == u'verse': - verse_list.append([element.attrib, element.text]) + verse_list.append([element.attrib, + unicode(element.text).decode('unicode-escape')]) return verse_list def dump_xml(self): diff --git a/openlp/core/lib/themexmlhandler.py b/openlp/core/lib/themexmlhandler.py index 0501fb06f..1ffece78b 100644 --- a/openlp/core/lib/themexmlhandler.py +++ b/openlp/core/lib/themexmlhandler.py @@ -30,7 +30,7 @@ from xml.etree.ElementTree import ElementTree, XML from openlp.core.lib import str_to_bool blankthemexml=\ -''' +''' BlankStyle @@ -348,6 +348,7 @@ class ThemeXML(object): iter = theme_xml.getiterator() master = u'' for element in iter: + element.text = unicode(element.text).decode('unicode-escape') if len(element.getchildren()) > 0: master = element.tag + u'_' else: diff --git a/openlp/core/ui/amendthemeform.py b/openlp/core/ui/amendthemeform.py index 27197c5af..4e5b9cd9d 100644 --- a/openlp/core/ui/amendthemeform.py +++ b/openlp/core/ui/amendthemeform.py @@ -126,7 +126,7 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog): def accept(self): new_theme = ThemeXML() theme_name = unicode(self.ThemeNameEdit.displayText()) - new_theme.new_document(theme_name) + new_theme.new_document(theme_name.encode('unicode-escape')) save_from = None save_to = None if self.theme.background_mode == u'transparent': @@ -144,7 +144,7 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog): (path, filename) = \ os.path.split(unicode(self.theme.background_filename)) new_theme.add_background_image(filename) - save_to= os.path.join(self.path, theme_name, filename ) + save_to = os.path.join(self.path, theme_name, filename) save_from = self.theme.background_filename new_theme.add_font(unicode(self.theme.font_main_name), diff --git a/openlp/core/ui/maindisplay.py b/openlp/core/ui/maindisplay.py index ebd810c5c..4f8cba499 100644 --- a/openlp/core/ui/maindisplay.py +++ b/openlp/core/ui/maindisplay.py @@ -28,7 +28,7 @@ import os from PyQt4 import QtCore, QtGui from PyQt4.phonon import Phonon -from openlp.core.lib import Receiver, str_to_bool +from openlp.core.lib import Receiver class DisplayWidget(QtGui.QWidget): """ diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index 5ca29c874..347f7fbed 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -679,7 +679,8 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow): self.setWindowTitle(title) def defaultThemeChanged(self, theme): - self.DefaultThemeLabel.setText(self.defaultThemeText + theme) + self.DefaultThemeLabel.setText( + u'%s %s' % (self.defaultThemeText, theme)) def toggleMediaManager(self, visible): if self.MediaManagerDock.isVisible() != visible: diff --git a/openlp/plugins/songs/lib/mediaitem.py b/openlp/plugins/songs/lib/mediaitem.py index 33ee028e2..f69faed8b 100644 --- a/openlp/plugins/songs/lib/mediaitem.py +++ b/openlp/plugins/songs/lib/mediaitem.py @@ -291,7 +291,7 @@ class SongMediaItem(MediaManagerItem): service_item.editId = item_id service_item.verse_order = song.verse_order if song.lyrics.startswith(u'