← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~mahfiaz/openlp/bug-860876 into lp:openlp

 

mahfiaz has proposed merging lp:~mahfiaz/openlp/bug-860876 into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)
Related bugs:
  Bug #860876 in OpenLP: "web-remote: utf8 alert"
  https://bugs.launchpad.net/openlp/+bug/860876

For more details, see:
https://code.launchpad.net/~mahfiaz/openlp/bug-860876/+merge/85758

Fix bug #860876, problem with unicode characters coming from web-remote.
-- 
https://code.launchpad.net/~mahfiaz/openlp/bug-860876/+merge/85758
Your team OpenLP Core is requested to review the proposed merge of lp:~mahfiaz/openlp/bug-860876 into lp:openlp.
=== modified file 'openlp/plugins/remotes/lib/httpserver.py'
--- openlp/plugins/remotes/lib/httpserver.py	2011-11-26 20:32:47 +0000
+++ openlp/plugins/remotes/lib/httpserver.py	2011-12-14 22:49:24 +0000
@@ -315,7 +315,9 @@
         """
         log.debug(u'ready to read socket')
         if self.socket.canReadLine():
-            data = unicode(self.socket.readLine()).encode(u'utf-8')
+            data = self.socket.readLine()
+            data = QtCore.QByteArray.fromPercentEncoding(data)
+            data = unicode(data, 'utf8')
             log.debug(u'received: ' + data)
             words = data.split(u' ')
             response = None


Follow ups