On Tue, Oct 24, 2006 at 03:53:22PM +0200, sophana wrote:
> # sitecustomize.py                   1
> # this file can be anywhere in your Python path,
> # but it usually goes in ${pythondir}/lib/site-packages/
> import sys
> sys.setdefaultencoding('iso-8859-1') 2

   I very much recommend against this! Your programs will be non-portable,
because other people will not have your sitecustomize.py.
   I know, I was there. And I very much regretted it.

   The Right Way to process strings is:

-- choose one string representations: either strings or unicode, but not
   both;
-- on every input (from files, from sockets, from GUI) convert input values
   to your preferred representation; in case of strings - to your preferred
   encoding;
-- on every output convert values back.

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            [EMAIL PROTECTED]
           Programmers don't die, they just GOSUB without RETURN.

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to