This may be related:

"sgmllib _convert_ref UnicodeDecodeError exception, new in 2.5"

----- Original Message ----
From: Glenn MacGregor <>
To: Oleg Broytmann <>; Glenn MacGregor <>;
Sent: Tuesday, January 8, 2008 8:25:20 AM
Subject: Re: [SQLObject] Unicode characters

Thanks for all the help! I got it working using the default charset and explicitly setting the necessary columns to UnicodeCol, I am going to try using use_unicode just to verify.



On Jan 7, 2008 3:26 PM, Oleg Broytmann <> wrote:
On Mon, Jan 07, 2008 at 03:13:18PM -0500, Glenn MacGregor wrote:
> 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
> line 146 which encodes the query using latin1 in both cases,
> means that mysql default charset for the connection is latin1.

  Very strange. The offending character can be decoded from latin1 without
any problem:

>>> unicode("\xc3", "utf-8")
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
UnicodeDecodeError: 'utf8' codec can't decode byte 0xc3 in position 0: unexpected end of data

>>> unicode("\xc3", "latin1")

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

Looking for last minute shopping deals? Find them fast with Yahoo! Search.