Fix bug #860876, problem with unicode characters coming from web-remote.

bzr-revno: 1838
Fixes: https://launchpad.net/bugs/860876
This commit is contained in:
Mattias Põldaru 2011-12-15 17:38:18 +02:00 committed by Raoul Snyman
commit b0bd6dcdb7

View File

@ -315,7 +315,9 @@ class HttpConnection(object):
""" """
log.debug(u'ready to read socket') log.debug(u'ready to read socket')
if self.socket.canReadLine(): 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) log.debug(u'received: ' + data)
words = data.split(u' ') words = data.split(u' ')
response = None response = None