diff options
author | Krzysztof Klinikowski <kkszysiu@gmail.com> | 2010-03-29 01:09:07 +0200 |
---|---|---|
committer | Krzysztof Klinikowski <kkszysiu@gmail.com> | 2010-03-29 01:09:07 +0200 |
commit | 778710291e7e3745a57a6b555beaad260084d24c (patch) | |
tree | a971ad1df174a1e7cd724d8bdf2d2d6366dc40fd /sunshine/channel | |
parent | f1e52ea801473ab8eee155a865a7dbab424f43b1 (diff) |
UTF-8 in messages correction
Diffstat (limited to 'sunshine/channel')
-rw-r--r-- | sunshine/channel/text.py | 2 |
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") |