From: Oleg B. <ph...@ma...> - 2004-11-30 10:39:37
|
On Tue, Nov 30, 2004 at 12:29:33PM +0200, Max Ischenko wrote: > class User(SQLObject): > name = StringCol(length=96, default='') > > _get_name = getstring('name') > _set_name = setstring('name') > > This solution provides convertion from Unicode (used throughout the > probram) to the utf-8 encoding accepted by SQLObject. > > Obviously, this is far from ideal. Therefore I'd like to see how the > others deal with this problem. Subclass StrCol, and convert data from unicode to db encoding and back in its validator. > Btw, Oleg's proposal about getting rid of sqlobject ad-hoc escaping can > possibly solve the Unicode problem as well. In what way?! In any case you cannot store unicode directly in the db - you must convert it to a db encoding. Oleg. -- Oleg Broytmann http://phd.pp.ru/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |