[Zope3-dev] Re: Issue 124 in the collector.
Martijn Faassen
faassen at infrae.com
Thu Feb 12 14:44:56 EST 2004
Tres Seaver wrote:
> Nicolas Évrard wrote:
>
> >I've met the issue 124 from the collector again but I found a way around
> >this issue.
> >
> >The Python you're using when running zope3 should have
> >sys.defaultencoding set to 'utf' and not 'ascii'.
> >
> >On my debian system, it's impossible to use sys.setdefaultencoding() so
> >I could not try the patch but it should work.
>
> Can you edit /path/to/python2.3/site-packges/sitecustomize.py? That
> file is the only possible place to change the encoding, I think.
>
> $ more /opt/zc/lib/python2.3/site-packages/sitecustomize.py
> import sys
> sys.setdefaultencoding('latin-1')
Yes, that's the only possible way to do it; the method gets deleted after
site.py gets run. Of course it's not very useful to require you change this
globally on your system. I very much suspect it'll screw up other packages,
and if you develop with such a thing set other people would need to have
the same setting, etc. I suspect therefore that this thing is fairly useless
if you care about compatibility.
I've missed what the original discussion is about, but if Zope 3 now
requires you change the default encoding in order for it to run
properly then I'd say that's really really bad. :)
Regards,
Martijn
More information about the Zope3-dev
mailing list