I think this is configurable on the MySQL server directly, i.e. default charset, otherwise you can set it via **{'mysql_DEFAULT CHARSET':'utf8'} in your Table def.
On Jan 15, 2009, at 3:17 PM, KevinTran wrote: > > I have the table definition below: > > urls = Table('url', meta, > Column('id', Integer(11), primary_key=True), > Column('address', Unicode(1024)), > Column('content', Unicode(255)), > mysql_engine='InnoDB' > ) > > This will make the SQL below: > > CREATE TABLE `url` ( > `id` int(11) NOT NULL AUTO_INCREMENT, > `address` varchar(1024) DEFAULT NULL, > `content` varchar(255) DEFAULT NULL, > PRIMARY KEY (`id`), > ) ENGINE=InnoDB DEFAULT CHARSET=latin1 > > I want to know how I can specify the encoding for the table so that it > generates the following: > > DEFAULT CHARSET=utf8 > > instead of DEFAULT CHARSET=latin1 as it is now. > > As it is now, SQLAlchemy stores the table using the latin1 encoding > and converts the data back into Python unicode objects. This is fine > as long as I use only SQLAlchemy. The thing is that my code and the > table need to interact with other applications written by my colleague > and thus the tables must be encoded with utf8. I cannot find the > syntax to specify the encoding of the table. > > Thanks and I hope that my question makes sense. > > > --~--~---------~--~----~------------~-------~--~----~ 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 sqlalchemy+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---