[Python-3000] IDLE encoding setup

"Martin v. Löwis" martin at v.loewis.de
Mon Aug 13 00:51:47 CEST 2007


> Is the code which sets IOBinding.encoding still correct? That value is
> used in several places in IDLE, including setting the encoding for
> std{in,err,out}.

I think so, yes. The conditions in which it needs to be used will have
to change, though: Python 3 defaults to UTF-8 as the source encoding,
so there is no need to use a computed encoding when there is no declared
one, anymore.
What encoding IDLE should use for sys.stdout is as debatable as it
always was (i.e. should it use a fixed on, independent of installation,
or a variable one, depending on the user's locale)
> Same question for IOBinding.py:IOBinding.{encode(),decode()} !

This is still mostly correct, except that it should encode as UTF-8
in the absence of any declared encoding (see above).
I'll fix that when I find some time.
Regards,
Martin


More information about the Python-3000 mailing list

AltStyle によって変換されたページ (->オリジナル) /