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

I

Irmen de Jong

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top