Fix for 860876, a bug where web remote returns wrongly decoded alert message. It also fixes no search results when searching words with non-ascii characters.

Fixes: https://launchpad.net/bugs/860876
This commit is contained in:
Mattias Põldaru 2011-12-15 00:39:52 +02:00
parent c10f73144d
commit ac557714ef
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