jeudi 28 mai 2015

PythonGTK - Can't write special characters into database

I wrote the following program that writes into a sqlite3 table:

http://ift.tt/1claN1G

It works fine except when trying to save language specific characters, for example:

Ää,ß, ç

When trying to insert into the table I get following error message:

SQL Error

You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings.

How can I fix that?

Aucun commentaire:

Enregistrer un commentaire