thanks, You are right! 2010/1/14 Ilia Kharin <aksc...@gmail.com>
> If you use utf8 encoding in database you must set your character set in > connection url e.g.: > >>> engine = create_engine('mysql://root:@localhost/dev?charset=utf8') > > ... > > >>> name1 = '中文中文' > >>> name1 > '\xe4\xb8\xad\xe6\x96\x87\xe4\xb8\xad\xe6\x96\x87' > >>> print name1 > 中文中文 > >>> ed_user = User(name1) > >>> session.add(ed_user) > >>> session.commit() > > -- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To post to this group, send email to sqlalch...@googlegroups.com. > To unsubscribe from this group, send email to > sqlalchemy+unsubscr...@googlegroups.com<sqlalchemy%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/sqlalchemy?hl=en. > > -- my.unix-center.net/~WeiZhicheng--
You received this message because you are subscribed to the Google Groups "sqlalchemy" group.
To post to this group, send email to sqlalch...@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.