beznogno / pyicqt

Automatically exported from code.google.com/p/pyicqt
GNU General Public License v2.0
0 stars 0 forks source link

contacts with bad unicode status #157

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
some contact have status, which can not be converted by
status.encode("utf-8", "replace")

What version of the product are you using? On what operating system?
0.8.1.1, Arch Linux

Suggested path for legacy/icqt.py:

--- icqt.py.org 2009-01-12 19:55:44.000000000 +0300
+++ icqt.py 2009-01-23 12:57:41.000000000 +0300
@@ -321,7 +321,10 @@
            self.oscarcon.legacyList.delCustomStatus(user.name, savemask=mask)

        LogEvent(WARN, self.session.jabberID, "Status message: %s" % status)
+       try:
        status = status.encode("utf-8", "replace")
+                except UnicodeDecodeError:
+                        status = "unicode error"
        # status = status.encode(config.encoding, "replace")

        if config.xstatusessupport:     

not sure is it correct, but it can prevent connection lost, catching
exception in place.

Original issue reported on code.google.com by pupyk...@gmail.com on 23 Jan 2009 at 10:41

GoogleCodeExporter commented 9 years ago

Original comment by r000ns...@gmail.com on 16 Feb 2009 at 10:33

GoogleCodeExporter commented 9 years ago
I hope this was fixed

Original comment by r000ns...@gmail.com on 20 Feb 2009 at 12:39