Changing the connection string to incorporate charset=latin1 fails at a different place. With that in the string the failure happens at line 383. I have also tried charset=utf8 with the same results.

I have tried changing the settings in the my.cnf to manage to connection types but to no avail.

Is there something I can do to decode or escape the offending chars?


On Jan 7, 2008 2:29 PM, Oleg Broytmann <> wrote:
On Mon, Jan 07, 2008 at 02:00:51PM -0500, Glenn MacGregor wrote:
> it fails at a different location, line 146 of of the Mysqldb
> package.
> query = query.encode(charset)
> charset is latin1 and it fails with the error:
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 36:
> ordinal not in range(128)

  Does "charset=latin1" without "use_unicode" help?

    Oleg Broytmann     
          Programmers don't die, they just GOSUB without RETURN.