[SQLObject] Problems with unicode

2006-05-30 Thread Felix
Thanks Max !!! it's surely help me a lot On Sun, 28 May 2006 21:20:11 +0300 "Max Ischenko" <[EMAIL PROTECTED]> wrote: > > http://maxischenko.in.ua/blog/entries/89/sqlobject-unicode-and-ascii-error/ > > HTH, > Max. > > > Hi !! what happens here ?? > > > > class Table(SQLObject): > > class

RE: [SQLObject] Problems with unicode

2006-05-28 Thread Max Ischenko
http://maxischenko.in.ua/blog/entries/89/sqlobject-unicode-and-ascii-error/ HTH, Max. > Hi !! what happens here ?? > > class Table(SQLObject): > class sqlmeta: > fromDatabase=True > > name = StringCol() > > Now, This works: > var = 'ñ' > Table(name=var)

Re: [SQLObject] Problems with unicode

2006-05-28 Thread Oleg Broytmann
On Sat, May 27, 2006 at 07:20:39PM -0300, Jo?o Paulo Fernandes Farias wrote: > BTW, anyone knows why I can't use setdefaultencoding() outside > sitecustomize.py? That's a really useful function. Python core developers hasn't decided how to handle encodings. They decided for now to allow one fix

Re: [SQLObject] Problems with unicode

2006-05-27 Thread João Paulo Fernandes Farias
That's true... But it is more likely the sysadmin of the deployment server will not deny creating that file for you. Or u can stick with unicodecol and deal with converting from/to database. BTW, anyone knows why I can't use setdefaultencoding() outside sitecustomize.py? That's a really useful fu

Re: [SQLObject] Problems with unicode

2006-05-27 Thread Oleg Broytmann
On Sat, May 27, 2006 at 11:50:55AM -0300, Jo?o Paulo Fernandes Farias wrote: > Create a sitecustomize.py file under your lib/site-packages dir of Now all your programs are tainted. You can't move a program to another computer that doesn't have that sitecustomize.py. Oleg. -- Oleg Broytma

Re: [SQLObject] Problems with unicode

2006-05-27 Thread Felix
But i only need it for one of my python-sqlobject application How can it affect to other python app's ? On Sat, 27 May 2006 11:50:55 -0300 "João Paulo Fernandes Farias" <[EMAIL PROTECTED]> wrote: > Hi! > > I think I've posted this on the list before but it takes no time to > post again :) > > C

Re: [SQLObject] Problems with unicode

2006-05-27 Thread João Paulo Fernandes Farias
Hi! I think I've posted this on the list before but it takes no time to post again :) Create a sitecustomize.py file under your lib/site-packages dir of python setup with this on it: import sys sys.setdefaultencoding('utf8') And all your unicode problems are gone! With this I can use StringCol

Re: [SQLObject] Problems with unicode

2006-05-27 Thread Oleg Broytmann
On Sat, May 27, 2006 at 01:51:45PM +0200, Felix wrote: > I need to store unicode strings what can i do ? UnicodeCol Oleg. -- Oleg Broytmannhttp://phd.pp.ru/[EMAIL PROTECTED] Programmers don't die, they just GOSUB without RETURN. --

[SQLObject] Problems with unicode

2006-05-27 Thread Felix
Hi !! what happens here ?? class Table(SQLObject): class sqlmeta: fromDatabase=True name = StringCol() Now, This works: var = 'ñ' Table(name=var) But this doesn't works: var = u'ñ' Table(name=var) with this traceback: Traceback (m