Hi there,

You can include a command in the dburi that is executed upon
connection start. I use it all the time like this:

mysql://user:[EMAIL 
PROTECTED]:3306/dbname?init_command=set%20character%20set%20utf8

Arnar

On 5/14/07, Noam <[EMAIL PROTECTED]> 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.
>
> When using the mysql command line tool, it can be fixed with the "set
> character set" command:
>
> mysql> select display_name from tav.tg_user;
> +--------------+
> | display_name |
> +--------------+
> | ??? ????     |
> | ????         |
> +--------------+
> 2 rows in set (0.02 sec)
>
> mysql> set character set utf8;
> Query OK, 0 rows affected (0.00 sec)
>
> mysql> select display_name from tav.tg_user;
> +---------------------+
> | display_name        |
> +---------------------+
> | נעם רפאל     |
> | מנהל            |
> +---------------------+
> 2 rows in set (0.00 sec)
>
> phpmyadmin reports MySQL charset:  UTF-8 Unicode (utf8)
>
> How can I fix it from sqlalchemy?
>
> Thanks,
> Noam Raphael
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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