[Twisted-Python] unicode for pyPgSQL

exarkun at twistedmatrix.com exarkun at twistedmatrix.com
Wed Aug 12 12:51:15 EDT 2009

On 03:28 pm, petshmidt at googlemail.com wrote:
>does pyPgSQL doesn't support unicode?
>execute(query, params) #all items in params list are of  <type 
>I'm getting
>'ascii' codec can't encode character u'\xfc' in position 1: ordinal
>not in range(128)
>Do I need encode my params before sending a query and then decode all
>results back to unicode?

I don't know about pyPgSQL's unicode support.

I did recently learn that pyPgSQL doesn't support bind parameters, 
apparently resulting in almost any use of it insecure and vulnerable to 
SQL injection attacks.  You may want to investigate this further before 
deciding if it's worth figuring out how unicode works.


More information about the Twisted-Python mailing list