jj, I actually agree strongly with you regarding the potential dangers. My counter argument is that if you specify the encoding of the database in the config file to a different encoding than is in the mysql config file, don't you risk double-encoding anyway? Now that the bug is fixed in MySQLdb, and no other database needs such options, I'd prefer to promote the Unicode field as the proper way forward. SQLAlchemy should, via the MySQLdb module, determine at runtime the encoding of the database and translate from that encoding to unicode objects as necessary (as should any other ORM).
Cheers, David Shannon -jj Behrens wrote: > > I'm not necessarily disagreeing with you, but I do think it's really > bad practice to have your database confused about the encoding of the > data that it's storing. At one point, I had things messed up and the > data in the database was double encoded. Sure, it worked as long as I > was using SQLAlchemy, but if I ever decided to use something else, I > would have been in really bad shape. Fortunately, they fixed that bug > in MySQLdb. > > Happy Hacking! > -jj --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
