My mistake, not sure what happened, but when I set the charset=latin1 it fails in the same place as it fails without the charset set. That is cursors.py line 146 which encodes the query using latin1 in both cases, means that mysql default charset for the connection is latin1.

I am using str everywhere as far as I can tell.

 Glenn

On Jan 7, 2008 2:49 PM, Oleg Broytmann <phd@phd.pp.ru> wrote:
On Mon, Jan 07, 2008 at 02:38:08PM -0500, Glenn MacGregor wrote:
> Changing the connection string to incorporate charset=latin1 fails at a
> different place. With that in the string the failure happens at
> dbconnection.py line 383.

  Line 383 in the trunk is

       return ("INSERT INTO %s (%s) VALUES (%s)" %
               (table, ', '.join(names),
                ', '.join([ self.sqlrepr(v) for v in values])))

  so you probably got an error from sqlrepr, right? What was the error? If
it is UnicodeDecodeError - I do not understand where from have you got
unicode now. You are using str everywhere, right?

Oleg.
--
    Oleg Broytmann            http://phd.pp.ru/            phd@phd.pp.ru
          Programmers don't die, they just GOSUB without RETURN.