Understanding Unicode encodings

2006-07-23 Thread Raphael . Benedet
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)) where the different variables are returned by the libtagedit python

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 run

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

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 bet that you'd

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' encoding is set

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'),

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'),