[sqlalchemy] Re: Can I coerce strings into Unicode?

2009-06-12 Thread allen.fowler
Anybody? On Jun 4, 1:13 am, AF allen.fow...@yahoo.com wrote: Hello, I'm using sqlite and convert_unicode = True on the engine. How can I force coerce string based object attributes in to unicode? (I had thought convert_unicode = True would do this) Here is what I am seeing... Setup

[sqlalchemy] Re: Can I coerce strings into Unicode?

2009-06-12 Thread Gunnlaugur Briem
The engine's conversion to unicode doesn't happen when you assign the property, it happens when the underlying database operation is committed, and arrives in the python object's property only after roundtripping through the database. In [50]: m1.body = 'new - NOT unicode' In [51]: m1.body

[sqlalchemy] Re: Can I coerce strings into Unicode?

2009-06-12 Thread allen.fowler
On Jun 12, 6:00 am, Gunnlaugur Briem gunnlau...@gmail.com wrote: The engine's conversion to unicode doesn't happen when you assign the property, it happens when the underlying database operation is committed, and arrives in the python object's property only after roundtripping through the

[sqlalchemy] Re: Can I coerce strings into Unicode?

2009-06-12 Thread Michael Bayer
allen.fowler wrote: On Jun 12, 6:00 am, Gunnlaugur Briem gunnlau...@gmail.com wrote: The engine's conversion to unicode doesn't happen when you assign the property, it happens when the underlying database operation is committed, and arrives in the python object's property only after