Re: Selection error...

2007-10-21 Thread Guilherme Polo
2007/10/21, Abandoned <[EMAIL PROTECTED]>: > > > cursor.execute("SELECT id from templinks where url=%s", (URL,) ) > Yes i already try this before ask. > > URL.decode('latin-1').encode('utf-8') to transcode it into utf-8. > i know this but how do you know the html encoding's a latin-1 ? Try using c

Re: Selection error...

2007-10-21 Thread Abandoned
> cursor.execute("SELECT id from templinks where url=%s", (URL,) ) Yes i already try this before ask. URL.decode('latin-1').encode('utf-8') to transcode it into utf-8. i know this but how do you know the html encoding's a latin-1 ? Html encoding is to be iso-8859-9 or ascii or cp1254 ... For this

Re: Selection error...

2007-10-20 Thread Carsten Haese
On Sat, 20 Oct 2007 21:06:31 -0700, Dennis Lee Bieber wrote > On Sat, 20 Oct 2007 22:47:23 -0400, Carsten Haese <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > > Haven't we told you before not to use the % operator to fill values into > > a query? Use parameter binding: > >

Re: Selection error...

2007-10-20 Thread Carsten Haese
On Sat, 2007-10-20 at 18:28 -0700, Abandoned wrote: > Hi.. > I want to select datas but some datas give me this error: > > psycopg2.ProgrammingError: invalid byte sequence for encoding "UTF8": > 0xc720 > HINT: This error can also happen if the byte sequence does not match > the encoding expected

Selection error...

2007-10-20 Thread Abandoned
Hi.. I want to select datas but some datas give me this error: psycopg2.ProgrammingError: invalid byte sequence for encoding "UTF8": 0xc720 HINT: This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by "client_encoding". My selec