I18n issue with optik

Thorsten Kampe thorsten at thorstenkampe.de
Mon Apr 2 18:02:25 CEST 2007


* paul (Mon, 02 Apr 2007 17:49:15 +0200)
> Thorsten Kampe schrieb:
> [snipp]
> > I got the tip to set a different encoding by
> > sys.stdout = codecs.EncodedFile(sys.stdout, 'utf-8')
> > 
> > but unfortunately this does not change the encoding of any Terminal. 
> > So my question is: how can I set a different encoding to sys.stdout 
> > (or why can I set it without any error but nothing changes?)
> AFAIK you can't. If the terminal is limited to ascii it won't be able to
> display anything else; it might not even have the right font, so how are
> you supposed to fix that?

Actually rxvt, Poderosa and console have the ability to display non-
ASCII characters. I use the dejavu fonts that support non-ASCII, too.

But the problem is even simpler: I can't even set the standard Windows 
console ("cmd") to Windows 1252 in Python. Although directly executing 
"chcp 1252" works.

Thorsten



More information about the Python-list mailing list