[Twisted-Python] adbapi, PostgreSQL and Unicode

James Y Knight foom at fuhm.net
Fri May 13 16:58:02 EDT 2005


On May 13, 2005, at 2:33 PM, Michal Eldar wrote:

> Remy Cool wrote:
>
> First of all - Thanks !!! It was a nice surprise to find responses  
> to my quesion :)
>
> I read about Unicode in the Twisted Archive and a link to the FAQ  
> gave me the solution:
> I'm suppose to *encode* the unicode string before I'm passing it  
> over...
> This was THE difference when working with Twisted.
> http://twistedmatrix.com/pipermail/twisted-python/2005-April/ 
> 010198.html
> http://twistedmatrix.com/projects/core/documentation/howto/ 
> faq.html#auto25
>

Actually, that doesn't really apply to ADBAPI. Twisted's ADBAPI  
doesn't care what you pass to its runQuery/etc methods -- it simply  
passes that on to the database. It can be a unicode string or any  
random object, as long as the database adapter accepts it. It's hard  
to say what might be going wrong without a traceback, of course.

James




More information about the Twisted-Python mailing list