[I18n-sig] default encoding as global state (was Re: Unicode debate)

Peter Funk pf@artcom-gmbh.de
Wed, 3 May 2000 12:11:30 +0200 (MEST)


Ka-Ping Yee:
[...]
> For example:
[...]
>     >>> u"".popenc()                   # back to the Latin-1 encoding

I think 'popenc' is a very poor name.  I wondered several seconds about
the trailing 'c' on 'popen' (thinking of 'os.popen') before I realized, that
this should really mean 'pop_encoding'.

IMO this builtin stack model to deal with a global state is overkill and
inconsistent with other already existing global states.  Look for example 
at 'os.getcwd()' and 'os.chdir()'.  What about 'set_encoding()' and 
'get_encoding()'?  

You can always and easy add the stack functionality as you can
easy implement 'pushd()' and 'popd()' on top of 'os.chdir()' and
'os.getcwd()'.

[Charset X-UNKNOWN unsupported, skipping...]
Umm.... BTW: why does your email header contains the following lines?:
	 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN
	 Content-Transfer-Encoding: 8BIT

Regards, Peter