Re: Understanding Unicode & encodings

2006-07-23 Thread John Machin
Jim wrote: > John Machin wrote: > > Jim wrote: > > > No, I'll bet that you'd like to run something like > > > self.dcCursor.execute("INSERT INTO track (name, nbr, idartist, > > > idalbum,path) VALUES (%(track)s, %(nbr)s, > > > %(idartist)s,%(idalbum)s,'%(path)s')", > > > {'track':track,'nbr':nbr

Re: Understanding Unicode & encodings

2006-07-23 Thread Jim
John Machin wrote: > Jim wrote: > > No, I'll bet that you'd like to run something like > > self.dcCursor.execute("INSERT INTO track (name, nbr, idartist, > > idalbum,path) VALUES (%(track)s, %(nbr)s, > > %(idartist)s,%(idalbum)s,'%(path)s')", > > {'track':track,'nbr':nbr,'idartist':idartist,'idal

Re: Understanding Unicode & encodings

2006-07-23 Thread John Machin
[EMAIL PROTECTED] wrote: > [EMAIL PROTECTED] wrote: > > I tried to encode the different variables in many different encodings > > (latin1), but I always get an exception. Where does this ascii codec > > error comes from? How can I simply build this query string? > > Raphael, > > The 'ascii' encodin

Re: Understanding Unicode & encodings

2006-07-23 Thread John Machin
Jim wrote: > [EMAIL PROTECTED] wrote: > > Hello, > > > > For my application, I would like to execute an SQL query like this: > > self.dbCursor.execute("INSERT INTO track (name, nbr, idartist, idalbum, > > path) VALUES ('%s', %s, %s, %s, '%s')" % (track, nbr, idartist, > > idalbum, path)) > No, I'll

Re: Understanding Unicode & encodings

2006-07-23 Thread clarkcb
[EMAIL PROTECTED] wrote: > I tried to encode the different variables in many different encodings > (latin1), but I always get an exception. Where does this ascii codec > error comes from? How can I simply build this query string? Raphael, The 'ascii' encoding is set in the python library file sit

Re: Understanding Unicode & encodings

2006-07-23 Thread Jim
[EMAIL PROTECTED] wrote: > Hello, > > For my application, I would like to execute an SQL query like this: > self.dbCursor.execute("INSERT INTO track (name, nbr, idartist, idalbum, > path) VALUES ('%s', %s, %s, %s, '%s')" % (track, nbr, idartist, > idalbum, path)) No, I'll bet that you'd like to ru