Re: [pysqlite] more Unicode grief

"Eric S. Johansson" <[email protected]>
Newsgroups gmane.comp.python.db.pysqlite.user
Message-ID <[email protected]>
Gerhard Häring wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> 
> The SQLite API returns UTF-8 encoded C strings. In order to produce
> Unicode objects, pysqlite has to do the Python C-API equivalent of calling
> 
> unicode(..., "utf-8")
> 
> So, the problem is still that you've got non UTF-8 data in your database.
> 
> I'll change pysqlite in the next release so that it will be impossible
> to create such scenarios at least by using pysqlite to enter data.

not intending to sound too pissy but that doesn't help me a whole lot right now 
  because I have a broken application and a cranky customer.  :-)

The fact remains that I have this non-ASCII text I have to deal with.  I have 
normalized all of this text into Unicode.  What do form do I need to convert it 
into in order to have something that can be stored, searched, and retrieved?

Like I said earlier, the documentation says I can just convert everything to 
Unicode and it will be converted appropriately into and out of pysqlite.  If 
that is not the case, please, I ask you to fix the documentation so that other 
folks are not led astray.

  I apologize for my crankiness but I am currently receiving a fair amount of 
heat and I'm trying to figure out a reasonable solution for this problem.

---eric

-- 
Speech-recognition in use.  It makes mistakes, I correct some.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.