Changed everything to ASCII. I'm worried we'll lose the forest for the \u1f332
[twitter-api-cdsw] / tweepy / models.py
index 1338ab456b37227d895f2128af9942e79417edd0..9b70070887bbb6fa48ea03d15f161cac4f513c3e 100644 (file)
@@ -69,6 +69,11 @@ class Status(Model):
     def parse(cls, api, json):
         status = cls(api)
         for k, v in json.items():
+            
+            # Hack by guyrt to fix unicode issues, which we do *not* want to teach.
+            if isinstance(v, basestring):
+                v = v.encode('ascii', errors='ignore')
+
             if k == 'user':
                 user_model = getattr(api.parser.model_factory, 'user') if api else User
                 user = user_model.parse(api, v)

Benjamin Mako Hill || Want to submit a patch?