Re: Sqlite3 textfactory and user-defined function
- From: Gerhard Häring <gh@xxxxxxxxxxx>
- Date: Sun, 22 Jun 2008 00:25:18 +0200
jeff_d_harper@xxxxxxxxxxx wrote:
I've run into a problem with text encoding in the Sqlite3 module. I
think it may be a bug. By default sqlite3 converts strings in the
database from UTF-8 to unicode. This conversion can be controlled by
changing the connection's text_factory.
I have a database that stores strings in 8-bit ISO-8859. So, I set
the text_factory to do no conversion. In my database I use user
defined functions. I noticed that even when I set text_factory =
lambda x:x, it appears to do UTF-8 to unicode conversion on strings
that are passed to my user defined function. [...]
I've answered the same question on the pysqlite mailing list a few weeks
back:
Thread "Trouble with create_function interface to sqlite"
http://itsystementwicklung.de/pipermail/list-pysqlite/2008-May/000062.html
-- Gerhard
.
- References:
- Sqlite3 textfactory and user-defined function
- From: jeff_d_harper
- Sqlite3 textfactory and user-defined function
- Prev by Date: Re: Way to unblock sys.stdin.readline() call
- Next by Date: Re: Way to unblock sys.stdin.readline() call
- Previous by thread: Sqlite3 textfactory and user-defined function
- Next by thread: Learning Python: Code critique please
- Index(es):
Relevant Pages
|