From: Max I. <ma...@uc...> - 2004-11-30 10:58:01
|
Oleg Broytmann wrote: > > Subclass StrCol, and convert data from unicode to db encoding and > back in its validator. May be. >>Btw, Oleg's proposal about getting rid of sqlobject ad-hoc escaping can >>possibly solve the Unicode problem as well. > > > In what way?! Well, I may be wrong here. I didn't follow that thread in details, but AFAIU, SQLObject interpolates string by itself, probably using str(). And this would give a UnicodeError for non-ascii encodings. IIRC, native db drivers handle unicode input without problems. At least those I've used. And moreover, they return data in a record set in unicode as well. > In any case you cannot store unicode directly in the db > - you must convert it to a db encoding. Most modern dbs and python drivers handle this problem transparently. At least, that's my experience. And discussed issues may be an indicator that the problem lies within the SQLObject itself. --max. |