[I18n-sig] New Unicode default encoding scheme

Toby Dickenson tdickenson@geminidataloggers.com
Mon, 10 Jul 2000 12:25:04 +0100


On Fri, 09 Jun 2000 13:09:19 +0200, "M.-A. Lemburg" <mal@lemburg.com>
wrote:

>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?

=46or Zope, the right place to set the default encoding is in __main__,
which doesnt seem unreasonable.


At the moment the restriction is enforced with a
'del sys.setdefaultencoding' near the end of site.py. This means the
restriction can be bypassed with a 'reload(sys)'. Am I going to regret
doing that?


Toby Dickenson
tdickenson@geminidataloggers.com