[sqlalchemy] Re: Non UTF8 strings retreived via mapped class - 0.5beta3

2008-08-21 Thread William Temperley
It looks pretty clear that this is a Django error. It's calling str(s) which will fail for a unicode object which contains multibyte characters, which would be the case for a UTF-8 encoded string converted to unicode by SQLAlchemy.. It clearly isn't a Django error! Python Shell:

[sqlalchemy] Re: Non UTF8 strings retreived via mapped class - 0.5beta3

2008-08-21 Thread Michael Bayer
On Aug 21, 2008, at 5:02 AM, William Temperley wrote: It looks pretty clear that this is a Django error. It's calling str(s) which will fail for a unicode object which contains multibyte characters, which would be the case for a UTF-8 encoded string converted to unicode by SQLAlchemy..

[sqlalchemy] Re: Non UTF8 strings retreived via mapped class - 0.5beta3

2008-08-20 Thread Michael Bayer
On Aug 20, 2008, at 12:51 PM, Will Temperley wrote: Hi I'm having some trouble with a UTF8 DB and strings not being converted. I get the following: 'ascii' codec can't encode character u'\xe2' in position 142: ordinal not in range(128). See the code below. With the same engine, if I

[sqlalchemy] Re: Non UTF8 strings retreived via mapped class - 0.5beta3

2008-08-20 Thread William Temperley
On Wed, Aug 20, 2008 at 6:34 PM, Michael Bayer [EMAIL PROTECTED] wrote: On Aug 20, 2008, at 12:51 PM, Will Temperley wrote: Hi I'm having some trouble with a UTF8 DB and strings not being converted. I get the following: 'ascii' codec can't encode character u'\xe2' in position 142:

[sqlalchemy] Re: Non UTF8 strings retreived via mapped class - 0.5beta3

2008-08-20 Thread Michael Bayer
On Aug 20, 2008, at 6:09 PM, William Temperley wrote: It happens when I do this in a python shell - I'm just printing the __repr__: Source.metadata.create_all(engine) results = session.query(Source).all() results line 31, in _dec args[0] = force_unicode(args[0]) File