From: Oleg B. <ph...@ma...> - 2004-11-30 14:04:45
|
On Tue, Nov 30, 2004 at 03:38:44PM +0200, Max Ischenko wrote: > >class UnicodeStringValidator(validators.Validator): > > > > def fromPython(self, value, state): > > return value.encode(db_encoding) > > > > def toPython(self, value, state): > > return unicode(value, db_encoding) > > What's the value of db_encoding here? Database encoding. I personnaly use koi8-r, but it can be anythying your DB understands. If your DB understands UTF-8 (for ORDER BY, UPPER()/LOWER() and all that) - go with it. Oleg. -- Oleg Broytmann http://phd.pp.ru/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |