summaryrefslogtreecommitdiff
path: root/sunshine/channel/text.py
diff options
context:
space:
mode:
authorKrzysztof Klinikowski <kkszysiu@gmail.com>2010-03-29 01:09:07 +0200
committerKrzysztof Klinikowski <kkszysiu@gmail.com>2010-03-29 01:09:07 +0200
commit778710291e7e3745a57a6b555beaad260084d24c (patch)
treea971ad1df174a1e7cd724d8bdf2d2d6366dc40fd /sunshine/channel/text.py
parentf1e52ea801473ab8eee155a865a7dbab424f43b1 (diff)
UTF-8 in messages correction
Diffstat (limited to 'sunshine/channel/text.py')
-rw-r--r--sunshine/channel/text.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sunshine/channel/text.py b/sunshine/channel/text.py
index 15ff76c..34c2269 100644
--- a/sunshine/channel/text.py
+++ b/sunshine/channel/text.py
@@ -46,7 +46,7 @@ class SunshineTextChannel(telepathy.server.ChannelTypeText):
def Send(self, message_type, text):
if message_type == telepathy.CHANNEL_TEXT_MESSAGE_TYPE_NORMAL:
logger.info("Sending message to %s, id %s, body: '%s'" % (str(self.handle.name), str(self.handle.id), unicode(text)))
- msg = text.encode('windows-1250')
+ msg = text.decode('UTF-8').encode('windows-1250', 'replace')
self.conn.gadu_client.sendTo(int(self.handle.name), str(text), str(msg))
else:
raise telepathy.NotImplemented("Unhandled message type")