[sqlalchemy] Re: utf hex instead of utf-8 return

2008-12-07 Thread Michael Bayer
you should also be on MySQLdb 1.2.2. Using the Unicode type in conjunction with charset=utf8use_unicode=0 and always passing Python unicode (u'') objects is the general recipe for unicode with MySQL. All this means is that SQLA sends utf-8-encoded strings to MySQLdb, MySQLdb does not

[sqlalchemy] Re: utf hex instead of utf-8 return

2008-12-07 Thread n00b
thanks!! you just confirmed my empirical observations, which puts me very much at ease :) for versions, 1.2.2 mysqldb, and v 5.0.67 and 6.0.7 (alpha) mysql (community ed.) thank again. On Dec 7, 8:52 am, Michael Bayer [EMAIL PROTECTED] wrote: you should also be on MySQLdb 1.2.2.  Using the

[sqlalchemy] Re: utf hex instead of utf-8 return

2008-12-07 Thread Michael Bayer
I'm not sure if that was sarcasm or not...if so, consider the time better spent analyzing the issue. The attached test illustrates a round trip of unicode data containing multibyte codepoints in both directions using both a raw cursor as well as a SQLAlchemy engine. Use this as a guide

[sqlalchemy] Re: utf hex instead of utf-8 return

2008-12-06 Thread n00b
thanks for the quick reply. i kept trying with it and no have reached the utter state of confusion. the specification of Unicode versus String in the table def's coupled with actual str representation has my totally confused. here's a quick script, have a look at the mysql table itself to see

[sqlalchemy] Re: utf hex instead of utf-8 return

2008-12-05 Thread Michael Bayer
I'm not sure of the mechanics of what you're experiencing, but make sure you use charset=utf8use_unicode=0 with MySQL. On Dec 5, 2008, at 4:17 PM, n00b wrote: greetings, SA (0.5.0rc1) keeps returning utf hex in stead of utf-8 and in the process driving me batty. all the mysql setup is