[Bug 28747] [telepathy-butterfly 0.5.11-1~ppa10.04+1] telepathy-butterfly crashed with UnicodeDecodeError in _signal_text_received()

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Jul 24 20:45:56 CEST 2010


https://bugs.freedesktop.org/show_bug.cgi?id=28747

--- Comment #3 from Benjamín Valero Espinosa <benjavalero at gmail.com> 2010-07-24 11:45:56 PDT ---
This happens when a nickname has non-Latin characters, in this block of code:

    def _signal_text_received(self, id, timestamp, sender, type, flags,
sender_nick, text):
        self.Received(id, timestamp, sender, type, flags, text)
        headers = dbus.Dictionary({dbus.String('message-received') :
dbus.UInt64(timestamp),
                   dbus.String('pending-message-id') : dbus.UInt32(id),
                   dbus.String('message-sender') : dbus.UInt32(sender),
                   dbus.String('message-type') : dbus.UInt32(type)
                  }, signature='sv')

        if sender_nick not in (None, ''):
            headers[dbus.String('sender-nickname')] = dbus.String(sender_nick)

        body = dbus.Dictionary({dbus.String('content-type'):
dbus.String('text/plain'),
                dbus.String('content'): dbus.String(text)
               }, signature='sv')
        message = dbus.Array([headers, body], signature='a{sv}')
        self.MessageReceived(message)

I am not an expert in Python, but I think that the problem is in the signature
of the dbus dictionaries (sv), because it supposes that the string given as key
is ascii. Perhaps that can be solved using "uv" as signature, or no signature
at all.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the telepathy-bugs mailing list