phasma wrote:
> Hi!
>
> I'm using mysql
>
> *************************** 1. row ***************************
> Variable_name: character_set_client
> Value: utf8
> *************************** 2. row ***************************
> Variable_name: character_set_connection
> Value: utf8
> *************************** 3. row ***************************
> Variable_name: character_set_database
> Value: utf8
> *************************** 4. row ***************************
> Variable_name: character_set_filesystem
> Value: binary
> *************************** 5. row ***************************
> Variable_name: character_set_results
> Value: utf8
> *************************** 6. row ***************************
> Variable_name: character_set_server
> Value: utf8
> *************************** 7. row ***************************
> Variable_name: character_set_system
> Value: utf8
> *************************** 8. row ***************************
> Variable_name: character_sets_dir
> Value: /usr/local/share/mysql/charsets/
>
> I have custom query:
>
> pub = Session.execute("SELECT a.header, a.name FROM publication as a
> USE INDEX(ix_newzee_publication_posttime) LEFT JOIN
> publication_category b ON b.id_publication = a.id WHERE a.status = 1
> AND a.posttime BETWEEN '1970-01-01 01:01:01' AND NOW() AND
> b.id_category = 9 ORDER BY a.posttime DESC LIMIT 10").fetchall()
>
> Query return error :
>
> <type 'exceptions.UnicodeDecodeError'>: 'ascii' codec can't decode
> byte 0xd0 in position 21: ordinal not in range(128)
>
> Does custom query return data in utf-8?
What character set is the db-api driver using? Try:
>>> engine.connect().connection.character_set_name()
If it's not utf8, you can configure the driver by adding 'charset=utf8'
to your database url.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---