diff options
author | yvesf <yvesf@d0e8fea9-7529-0410-93fb-d39fd5b9c1dd> | 2009-06-10 21:15:33 +0000 |
---|---|---|
committer | yvesf <yvesf@d0e8fea9-7529-0410-93fb-d39fd5b9c1dd> | 2009-06-10 21:15:33 +0000 |
commit | 8f3af268d4091fd6488a23480cbfdd9351046f42 (patch) | |
tree | abfbfa2fceb5996ad7821267b58966b27b007ea3 /omegle.py | |
parent | 13f7059823f35130dda74cfbe88e47ee9894e937 (diff) | |
download | omegle-8f3af268d4091fd6488a23480cbfdd9351046f42.tar.gz omegle-8f3af268d4091fd6488a23480cbfdd9351046f42.zip |
iblah
git-svn-id: http://xapek.org/svn/common/omegle@1107 d0e8fea9-7529-0410-93fb-d39fd5b9c1dd
Diffstat (limited to 'omegle.py')
-rw-r--r-- | omegle.py | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -125,9 +125,15 @@ class OmegleChat(RESTClient): """ #if a raw string given, assume its utf8 if msg.__class__ == str: - msg = msg.decode("utf8") + try: + msg = msg.decode("utf8") + except UnicodeDecodeError: + pass #convert utf8 to RAW-utf8 - msg = msg.encode("utf8") + try: + msg = msg.encode("utf8") + except UnicodeEncodeError,e: + self.logger.critical(e) if not self.is_confirmed: self.logger.error("Cant send message if not is_confirmed") |