On Thu, Mar 31, 2011 at 12:29:13AM -0700, [email protected] wrote:
> > Open web browser tohttp://127.0.0.1:8080/resource_items/I get a Server 
> > Error, the dreaded UnicodeDecodeError on Antoine de Saint-Exupéry name.
> >
> 
> Screenshot of error message that didn't make it here when I sent the
> email:
> 
> https://img.skitch.com/20110331-tbcjjfxbwamxqprss426tumisc.jpg
> 
From the error there, the data in the database may not be utf-8.  
'\xe9' is the byte sequence for é in latin-1, not in utf-8.

If you can retrieve the data from the database and look at it in a hex editor
and it has the byte sequence 0xe9 there then the problem is the data stored
in the db.  If you retrieve it that way and the hex sequence is 0xc3 0xa9
then the data in the database is correct and somewhere in the mysql python
bindings or sqlalchemy the data is going through a series of decode and
encode operations that result in it being encoded as latin-1 instead of
utf-8.

-Toshio

Attachment: pgpR5sdYwkKqZ.pgp
Description: PGP signature

Reply via email to