I like Unicode more than I used to...

Kim Petersen kp at kyborg.dk
Mon Mar 3 02:16:08 EST 2003


Martin v. Löwis wrote:
> Skip Montanaro <skip at pobox.com> writes:
> 
> 
>>The only obvious way to announce the encoding would be by exporting
>>an environment variable to the child program.
> 
> 
> On Unix, the convention is that the terminal should follow the
> locale's encoding; it is the user's responsibility to declare the
> locale so that it matches the terminal.

Actually that depends on the Unix version (and we might be talking major 
versions (eg. SysV vs. BSD)) - the import of STREAMs into SysV made it 
possible to change the encoding on the stream - not on the program (this 
works on at least one SysV i have - using mapchan(M) on SCO).

> 
> On Win32, there is API to determine the input and output encoding of a
> console window (yes, they can be different), provided you have a
> "console handle".
> 
> Regards,
> Martin
> 
-- 
Med Venlig Hilsen / Regards

Kim Petersen - Kyborg A/S
IT - Innovationshuset
Havnepladsen 2
7100 Vejle
Tlf. +4576408183 || Fax. +4576408188





More information about the Python-list mailing list