Re: Encoding trouble when script called from application

2014-01-14 Thread Peter Otten
Florian Lindner wrote: > Hello! > > I'm using python 3.2.3 on debian wheezy. My script is called from my mail > delivery agent (MDA) maildrop (like procmail) through it's xfilter > directive. > > Script works fine when used interactively, e.g. ./script.py < testmail but > when called from maildr

Re: Encoding trouble

2010-12-15 Thread Romaric DEFAUX
Le 15/12/2010 14:16, Benedict Verheyen a écrit : On 15/12/2010 12:34, Romaric DEFAUX wrote: To create these query, I do this : query = "UPDATE website SET client_name='%s' WHERE ip='%s'" % (self.client_name, self.ip) then self.cursor.execute(query) Unicode can be tricky. Don't you have to

Re: Encoding trouble

2010-12-15 Thread Benedict Verheyen
On 15/12/2010 12:34, Romaric DEFAUX wrote: > To create these query, I do this : > query = "UPDATE website SET client_name='%s' WHERE ip='%s'" % > (self.client_name, self.ip) > then self.cursor.execute(query) > Unicode can be tricky. Don't you have to encode the string again? I tested this in th