From: David T. <no...@op...> - 2007-10-05 16:27:09
|
On Thu, 2007-10-04 at 17:40 -0400, David Turner wrote: > On Thu, 2007-10-04 at 14:47 +0200, Markus Gritsch wrote: > > On 10/4/07, Oleg Broytmann <ph...@ph...> wrote: > > > On Thu, Oct 04, 2007 at 01:50:52PM +0200, Markus Gritsch wrote: > > > > In MySQLdb queries are *allowed* to be unicode. > > > > > > I meant - there were a period when SQLObject forces queries to be > > > unicode for MySQLdb 1.2.1+. Is that over now? Do we allow unicode but not > > > enforce it regardless of MySQLdb version? > > > > Ah, I understand. Well, I have not really an idea :( Maybe it would > > be a good idea to decode the string using self.encoding it was the > > case before removing it... David? > > I spent nearly all day working on this. > > I have to admit that I don't really understand all of the layers fully. Wait, after sleeping on it (and having extremely unsettling dreams), I think I may have it: The charset for a column is the charset that the column is stored in inside mysql. It has nothing whatsoever to do with SQLObject, if I understand correctly, except that SQLObject needs to set it when the table is created. It doesn't presently do so, it seems. Right now, we act as though we need to encode data into the column format. This is wrong. We should just send everything to mysql in the connection encoding (which we should set to always be utf-8, since it can represent anything). Mysql will convert it to the column encoding. I don't have time right now to do this, but now that I know where to go, I might get to it some time. Or if someone else is bored/needs it sooner. |