By the way, I found what appears to be a contradiction in the
SQLAlchemy docs. I had to use "use_unicode=1&charset=utf8" in my
query string to get SQLAlchemy to accept it, which agrees with the
MySQL notes on the SQLAlchemy wiki:
http://www.sqlalchemy.org/trac/wiki/DatabaseNotes
But the SQLAlchemy manual lists different options ("convert_unicode"
and "encoding"):
http://www.sqlalchemy.org/docs/dbengine.myt#dbengine
I'm not sure of the difference between the two or how you'd specify
the second set of options in the config file.
Another thing to watch out for is MySQL has one encoding for the
database (or table or column), and another for the client connection.
If the two differ MySQL converts values between them. I assume that
means you can set the encoding to anything in Pylons, and it will set
both the MySQL client encoding and the Unicode decode encoding.
I make it easy on myself and just use utf-8 everywhere, both for the
database and for HTML output. The only time I use a different
encoding is when parsing an external file, which may come in macroman
or windows-1252.
--
Mike Orr <[EMAIL PROTECTED]>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---