From 06bfe7f177a167db31a3e0497b997bd60f040115 Mon Sep 17 00:00:00 2001 From: cedricbonhomme Date: Sat, 6 Feb 2010 19:58:06 +0100 Subject: Bug fix : there was a problem with utf-8 in the SQLite3 database with Python 2.6. Solved with http://www.python.org/doc/2.6/library/sqlite3.html#using-adapters-to-store-additional-python-types-in-sqlite-databases . --- feedgetter.py | 1 + 1 file changed, 1 insertion(+) (limited to 'feedgetter.py') diff --git a/feedgetter.py b/feedgetter.py index aa755632..d65ef4b8 100644 --- a/feedgetter.py +++ b/feedgetter.py @@ -39,6 +39,7 @@ class FeedGetter(object): print "./feed.lst not found" exit(0) # Create the base if not exists. + sqlite3.register_adapter(str, lambda s : s.decode('utf-8')) self.conn = sqlite3.connect("./var/feed.db", isolation_level = None) self.c = self.conn.cursor() self.c.execute('''create table if not exists rss_feed -- cgit