On May 14, 2007, at 5:00 PM, Noam wrote:

>
> Hello,
>
> I'm trying to use sqlalchemy to access a database which contains
> unicode strings. When accessing the database through phpmyadmin the
> values look ok. When accessing them through sqlalchemy I get question
> marks instead of the characters which are not latin.
>

the standard approach to this is to use the "convert_unicode"  
argument to create_engine().

http://www.sqlalchemy.org/docs/dbengine.html#dbengine_options

MySQLDB also has its own unicode-converting argument which is  
'use_unicode':

create_engine('mysql://user:[EMAIL PROTECTED]/test?use_unicode=1')

issuing "set character set" on the connection is the least preferable  
approach (and that init_command thing is new to me).


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
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