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