absolutely, see the docs on the create_engine() argument "convert_unicode" here:
http://www.sqlalchemy.org/docs/03/dbengine.html#dbengine_options and the docs on the "Unicode" datatype here: http://www.sqlalchemy.org/docs/03/types.html any string type also accepts a flag "convert_unicode=True". so all three below will convert: Column('mycol1', String(50, convert_unicode=True)) Column('mycol2', Unicode(50)) Column('mycol3', TEXT(convert_unicode=True)) On Aug 9, 2:26 pm, Hermann Himmelbauer <[EMAIL PROTECTED]> wrote: > Hi, > I am writing a web application which retrieves data through SQLAlchemy. > Character-based data in this database is encoded as latin1. > > My Web-framework (Zope3) expects strings in the unicode format and throws > errors like this: > > UnicodeDecodeError: 'ascii' codec can't decode byte 0xfc in position 1: > ordinal not in range(128) > > I could of course convert data manually from latin1->unicode, however, this > will be quite some work, moreover my database will be converted to unicode > some day. > > A nice solution would be if SQLAlchemy could automatically do this conversion > (in both directions) - this would solve all my problems. Is this possible? > > Best Regards, > Hermann > > -- > [EMAIL PROTECTED] > GPG key ID: 299893C7 (on keyservers) > FP: 0124 2584 8809 EF2A DBF9 4902 64B4 D16B 2998 93C7 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---