Bug 24725

Summary: Can't send non-ascii offline messages
Product: Telepathy Reporter: Olivier Le Thanh Duong <olivier>
Component: butterflyAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Olivier Le Thanh Duong 2009-10-25 10:49:44 UTC
empathy/(null)-DEBUG: 1,256407e+09: empathy_tp_chat_send: Sending message: ma soirée c'est bien déroulé
empathy/(null)-DEBUG: 1,256407e+09: tp_chat_send_cb: Error: org.freedesktop.DBus.Python.UnicodeEncodeError: Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/dbus/service.py", line 702, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/home/olivier/Projects/telepathy-butterfly/butterfly/channel/text.py", line 104, in Send
    self._oim_box_ref().send_message(self._offline_contact, text)
  File "/usr/lib/pymodules/python2.6/papyon/util/decorator.py", line 111, in new_function
    func(*args, **kwargs)
  File "/usr/lib/pymodules/python2.6/papyon/service/OfflineIM/offline_messages_box.py", line 327, in send_message
    sm()
  File "/usr/lib/pymodules/python2.6/papyon/service/OfflineIM/scenario/base.py", line 31, in __call__
    return self.execute()
  File "/usr/lib/pymodules/python2.6/papyon/service/OfflineIM/scenario/send_message.py", line 56, in execute
    self.__msg)
  File "/usr/lib/pymodules/python2.6/papyon/service/SingleSignOn.py", line 109, in method
    None, *self._tokens)
  File "/usr/lib/pymodules/python2.6/papyon/service/SingleSignOn.py", line 155, in RequestMultipleSecurityTokens
    errback, [], (requested_services, response_tokens))
  File "/usr/lib/pymodules/python2.6/papyon/service/SingleSignOn.py", line 198, in _HandleRequestMultipleSecurityTokensResponse
    callback[0](result, *callback[1:])
  File "/usr/lib/pymodules/python2.6/papyon/service/SingleSignOn.py", line 104, in sso_callback
    func(object, user_callback, user_errback, *user_args, **user_kwargs)
  File "/usr/lib/pymodules/python2.6/papyon/service/OfflineIM/oim.py", line 45, in Store2
    content = self.__build_mail_data(session_id, message_number, message_content)
  File "/usr/lib/pymodules/python2.6/papyon/service/OfflineIM/oim.py", line 94, in __build_mail_data
    mail_data += base64.b64encode(content)
  File "/usr/lib/python2.6/base64.py", line 53, in b64encode
    encoded = binascii.b2a_base64(s)[:-1]
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 7: ordinal not in range(128)
Comment 1 Olivier Le Thanh Duong 2009-11-06 14:13:15 UTC
Fixed in telepathy butterfly 0.5.3

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.