Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PySqlite client_encoding, stores fine but queries don't return unicode

13 views
Skip to first unread message

Irmen de Jong

unread,
Dec 1, 2003, 3:06:52 PM12/1/03
to
Hello
I'm having some troubles with PySqlite (0.4.3, windows/linux).

I want to store unicode strings in the database.
So I open a connection with the client_encoding="UTF-8" parameter.
When I store a unicode string in a table, it seems to work fine.
(a sqlite .dump shows that it encoded the unicode string to UTF-8).

But the problem is that a *query* from the same table, doesn't
return the string contents as a unicode string! Rather, it
returns a normal string that still contains the UTF-8 encoded
bytes...

Is there any way to make pysqlite decode the UTF-8 strings
and return unicode strings automatically ?

Thanks!

-Irmen de Jong

0 new messages