[sqlalchemy] Hi,I found a codec bug,and I write a patch.

2010-01-13 Thread 诚子
detial please see http://my.unix-center.net/~WeiZhicheng/2010/01/13/sqlalchemy-0-6-unicodedecodeerror-bug-patch/ -- 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

Re: [sqlalchemy] Hi,I found a codec bug,and I write a patch.

2010-01-13 Thread Gaetan de Menten
On Wed, Jan 13, 2010 at 10:16, 诚子 zhicheng1...@gmail.com wrote: detial please see http://my.unix-center.net/~WeiZhicheng/2010/01/13/sqlalchemy-0-6-unicodedecodeerror-bug-patch/ Well, if I understand correctly, you would like a workaround for a bad truncate algorithm in mysql (which apparently

Re: [sqlalchemy] Hi,I found a codec bug,and I write a patch.

2010-01-13 Thread 诚子
yeah,maybe you are right, but I'm not professional in mysql I just use the SQLAlchemy default create the table and field the field is utf8_general_ci my problem like that import sqlalchemy sqlalchemy.__version__ '0.6beta1' from sqlalchemy import create_engine engine =

Re: [sqlalchemy] Hi,I found a codec bug,and I write a patch.

2010-01-13 Thread Ilia Kharin
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)

Re: [sqlalchemy] Hi,I found a codec bug,and I write a patch.

2010-01-13 Thread 诚子
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