Oleg Broytmann wrote: > On Mon, Jan 30, 2006 at 11:40:55AM +0700, Stuart Bishop wrote: > >>Oleg Broytmann wrote: >> >>> Do cls.selectBy(that_unicode_col=u'some string'.encode(dbEncoding)) >> >>We handle this quite simply by encoding the entire query before sending it >>to the database > > How do you handle different encoding? > > class Koiruski(SQLObject): > unixway = UnicodeCol(dbEncoding="koi8-r") > > class Windows(SQLObject): > mustDie = UnicodeCol(dbEncoding="cp1251")
The UnicodeCol columns would need to be quoted into a valid ASCII stream. I don't think this is supported at the moment anyway (at least with the PostgreSQL backend) - if you are talking to a PostgreSQL backend you would need to ensure that the client_encoding of the connection is ASCII or else you will get an error, and this is hard coded to UTF-8. -- Stuart Bishop <[EMAIL PROTECTED]> http://www.stuartbishop.net/
signature.asc
Description: OpenPGP digital signature
