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 connect directly, I
> have no problems but if I go via my mapped class (Source, also see
> below), I get such errors.
>
> Any ideas? Am I just being dumb here?


mapping looks fine.  The "convert_unicode=True" is not needed since  
this is implicit within the UnicodeText type, and in rare cases could  
even cause the problem you're having if you're storing binary data in  
other String columns.

Would have to see what actual steps to take which cause the issue (is  
this during query(), during flush(), during lazyload, etc). as well as  
a stack trace.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to