[Pythonmac-SIG] Getting Terminal input and output encoding

Nir Soffer nirs at freeshell.org
Thu Feb 16 16:15:02 CET 2006


On 16 Feb, 2006, at 15:00, Nir Soffer wrote:

> I noticed that it does not matter what encoding you set in the Terminal
> window setting, anything you type will use utf-8 encoding.

I was wrong, it does change the input encoding when you type or display 
strings.

However, testing common commands from Python using os.system and in 
shell scripts show that commands want to get utf-8 input and return 
utf-8 input. If you change the terminal charset encoding you simply 
display the utf-8 strings as junk.


Best Regards,

Nir Soffer



More information about the Pythonmac-SIG mailing list