fix unicode issues (again)
This commit is contained in:
parent
49fc66444c
commit
838f2bc712
|
@ -311,7 +311,7 @@ class Session(YowsupApp):
|
||||||
|
|
||||||
# Called by superclass
|
# Called by superclass
|
||||||
def onImage(self, image):
|
def onImage(self, image):
|
||||||
self.logger.debug('Received image message %s', str(image))
|
#self.logger.debug('Received image message %s', str(image))
|
||||||
buddy = image._from.split('@')[0]
|
buddy = image._from.split('@')[0]
|
||||||
participant = image.participant
|
participant = image.participant
|
||||||
if image.caption is None:
|
if image.caption is None:
|
||||||
|
|
4
utils.py
4
utils.py
|
@ -43,8 +43,8 @@ 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.decode("utf-8")
|
||||||
return e4u.translate(message, reverse=False, **e4u.SOFTBANK_TRANSLATE_PROFILE)
|
return message #e4u.translate(message, reverse=False, **e4u.SOFTBANK_TRANSLATE_PROFILE)
|
||||||
|
|
||||||
def decodePassword(password):
|
def decodePassword(password):
|
||||||
return base64.b64decode(bytes(password.encode("utf-8")))
|
return base64.b64decode(bytes(password.encode("utf-8")))
|
||||||
|
|
Loading…
Reference in a new issue