Re: sqlite3 and UTF-8

2010-12-07 Thread Peter Otten
Ale Ghelfi wrote: > i try this : > >> actual_encoding = ... # whatever >> def decode(s): >> return s.decode(actual_encoding) >> >> db = sqlite3.connect(...) >> db.text_factory = decode > > but now the error is : > > >>> rowset = cur.fetchall() > Traceback (most recent call last): >Fil

Re: sqlite3 and UTF-8

2010-12-07 Thread Ale Ghelfi
i try this : actual_encoding = ... # whatever def decode(s): return s.decode(actual_encoding) db = sqlite3.connect(...) db.text_factory = decode but now the error is : >>> rowset = cur.fetchall() Traceback (most recent call last): File "", line 1, in rowset = cur.fetchall() Fil

Re: sqlite3 and UTF-8

2010-12-07 Thread Peter Otten
Ale Ghelfi wrote: > I try to connect a database sqlite by sqlite3, but return an error. > > >>> rowset = cur.fetchall() > Traceback (most recent call last): >File "", line 1, in > rowset = cur.fetchall() > OperationalError: Could not decode to UTF-8 column 'DATO' with text > 'Document

sqlite3 and UTF-8

2010-12-07 Thread Ale Ghelfi
I try to connect a database sqlite by sqlite3, but return an error. >>> rowset = cur.fetchall() Traceback (most recent call last): File "", line 1, in rowset = cur.fetchall() OperationalError: Could not decode to UTF-8 column 'DATO' with text 'Document n°10' What's happend? thank you --