Arun Kumar PG wrote:
 >>     Ok, you need to get that charset to the driver.  Try removing SET
 >>     NAMES from your init_command, and instead pass charset=utf8 and
 >>     use_unicode=0 in your database connection URL.
 >
> why do we want to say use_unicode=0 instead or use_unicode=True here?

You can go either way with that.  The MySQLdb driver's default behavior 
when given a 'charset' is to also turn on its "return all strings in 
Unicode" mode.  If you want all of your strings as Unicode that's just 
dandy, but if you expecting them to come back as regular strings encoded 
in the charset you requested you'd be in for a surprise...

In my own code I enable use_unicode and I don't specify any Unicode 
options or column types at the SQLAlchemy level.

-j


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to