E. Frerich <[EMAIL PROTECTED]> wrote:
> > > line 545 of zope\app\container\contained.py contains a testcase ">>>
> > > setitem(container, container.__setitem__, 'hello ' + chr(200),
> > > item)" which should give back a traceback: "    Traceback (most
> > > recent call last):
> > >     ...
> > >     TypeError: name not unicode or ascii string
> > > "
> > > but the name parameter is correct:
> > > "
> > > >>> max=unicode('hello ' + chr(200))
> > 
> > That shouldn't work. You're running with a non-default system default
> 
> Oh - what is a "non-default system default"? The "naked" Python has 
> 'ascii' as default but you can customize the default for a Python site.

Yes but this is highly unadvised. It's more a band-aid for lazy apps
than anything else.

> So my Python site has the default encoding 'cp1252'. All applications
> - not only Zope 3 - use this encoding.

Which means that all your applications are written with an implicit
assumption about the default system encoding. And they will break on
platforms with a different choice.

> IMO Zope 3 should accept other default encodings.

Zope has to be conservative so that it knows it can run everywhere.

> And then this test is not helpful.

It ensures that Zope works with minimal "standard" python settings.

Florent

-- 
Florent Guillaume, Nuxeo (Paris, France)   CTO, Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   [EMAIL PROTECTED]
_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to