[I18n-sig] New Unicode default encoding scheme
Mon, 10 Jul 2000 14:47:25 +0100
Thanks for taking the time,
> > >For this, the implementation maintains a global which can be set in
> > >the site.py Python startup script. Subsequent changes are not
> > >possible. The <default encoding> can be set and queried using the
> > >two sys module APIs:
> > I'm confused about the justification for this restriction. I can see
> > that frequent arbitrary changes would be bad style, but is there any
> > reason stronger than that?
> Toby, would it be a problem for Zope if the system's default encoding
> were ASCII? You can still introduce the concept of a Zope default
> encoding, to be applied explicitly by all Zope code whenever you need
Yes, ascii is exactly what I want for Zope. The site.py in the current
CVS permanently sets the default-encoding based on locale, and I wanted
Zope's __main__ to change it back to ascii !
> This is what we are trying to get applications to do anyway:
> don't rely on the default encoding, always be explicit about the
> encoding. The ASCII default is intended to avoid having to worry
> about encodings when using ASCII string literals in code that
> manipulates strings and would otherwise work fine with either 8-bit or
> Unicode strings.