Fix text encode for cyrillic

This commit is contained in:
kiv1n 2016-08-10 22:08:00 +03:00
parent 118d65cbd8
commit c12b136b76
2 changed files with 2 additions and 2 deletions

View file

@ -268,7 +268,7 @@ class Session(YowsupApp):
self.logger.debug('received TextMessage' + self.logger.debug('received TextMessage' +
' '.join(map(str, [ ' '.join(map(str, [
_id, _from, to, notify, timestamp, _id, _from, to, notify, timestamp,
participant, offline, retry, body participant, offline, retry, body.encode("utf-8")
])) ]))
) )
buddy = _from.split('@')[0] buddy = _from.split('@')[0]

View file

@ -43,7 +43,7 @@ def ago(secs):
return "%d %s ago" % (diff, period) return "%d %s ago" % (diff, period)
def softToUni(message): def softToUni(message):
message = message.decode("utf-8") message = message.encode("utf-8")
return e4u.translate(message, reverse=False, **e4u.SOFTBANK_TRANSLATE_PROFILE) return e4u.translate(message, reverse=False, **e4u.SOFTBANK_TRANSLATE_PROFILE)
def decodePassword(password): def decodePassword(password):