I am trying to store and retrieve unicode text in an sqlite database
and repeatedly run into UnicodeEncodeErrors.

To start I am specifying the encoding in create_engine even though I
believe UTF-8 is default:
      create_engine('sqlite:///db/rnews.db', encoding='utf-8',
echo=True)

All my column types are Unicode. All my text is Unicode. I have also
tried adding the encoding to my unicode strings:
      u'Some string'.encode('utf-8')

When adding a new object to the session I get:

     UnicodeEncodeError: 'ascii' codec can't encode character
u'\u201c' in position 48: ordinal not in range(128)

How can I change the fact that an ascii codec is still being used?

Any help would be much appreciated,

Chad

-- 
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