Force output to UTF8 to work on fbsd
authorMagnus Hagander <magnus@hagander.net>
Wed, 7 Oct 2009 12:05:46 +0000 (14:05 +0200)
committerMagnus Hagander <magnus@hagander.net>
Wed, 7 Oct 2009 12:05:46 +0000 (14:05 +0200)
posttotwitter.py

index 636a72207aa1b92651de9009b36815462c8d0c1e..b0048c058b27c82105de804ad52c894d37d791fb 100755 (executable)
@@ -93,7 +93,7 @@ class PostToTwitter:
                        c.execute("UPDATE planet.posts SET twittered='t' WHERE id=%(id)s", { 'id': post[0] })
                        self.db.commit()
 
-                       print "Twittered: %s" % msg
+                       print unicode("Twittered: %s" % msg).encode('utf8')
 
 
        # Trim a post to the length required by twitter, so we don't fail to post