From: Andrew Ruthven Date: Tue, 23 Jun 2009 23:58:57 +0000 (+1200) Subject: Some people use UNICODE in their titles, make sure we can print them out. X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce1890b0a6ad50e53b66e3fbb25c5857746ca54e;p=whoisi.git Some people use UNICODE in their titles, make sure we can print them out. --- diff --git a/services/command/feedparse.py b/services/command/feedparse.py index ad35ffc..968a667 100644 --- a/services/command/feedparse.py +++ b/services/command/feedparse.py @@ -404,7 +404,7 @@ class FeedUpdateDatabaseCommand(BaseCommand): updated = datetime(*up) print(" inserting new entry for site %s" % self.site_id) - print(" title: %s" % entry.get("title", None)) + print(" title: %s" % entry.get("title", None).encode('ascii', 'replace')) print(" link: %s" % entry.get("link", None)) q = """