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
1 changed files with 3 additions and 1 deletions

View File

@ -315,7 +315,9 @@ class HttpConnection(object):
"""
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