Dieter Maurer wrote:
Tim Peters wrote at 2005-10-19 15:15 -0400:


Nowadays, life is hell without a sensible "setdefaultencoding":

True, but to many things would break if we set the default encoding to
disabled. :)

  Many isolated modules intersperse unicode in an otherwise
  "string" dominated world causing wide spread

Fortunately, Zope 3 is not a string dominated world.  All "text"
is unicode for Zope 3.  As a result, we have had very few problems.

It would have been easier if Python didn't automatically
promote strings to unicode, thus making it easier to detect string
missuse, but, unfortunately, it's too late to change that.

I'm sure sys.setdefaultencoding will vanish in a future Python
release, since it wasn't intended to persist beyond initial
development to begin with.

Hopefully only after Python cleaned up the separation
between text and binary strings.

This is really an application problem.  Applications should
not mix strings and unicode.  With a little discipline, this is
easier to do than one might expect.

Otherwise, I would be forced to maintain my private Python
version (with "setdefaultencoding").

Well, you shouldn't need to do this for Zope 3.  At some point,
we need to figure out how to clean this up for Zope 2.


Jim Fulton           mailto:[EMAIL PROTECTED]       Python Powered!
CTO                  (540) 361-1714  
Zope Corporation
Zope3-dev mailing list

Reply via email to