Can Python write foreign characters to the console?

"Martin v. Löwis" martin at v.loewis.de
Sat Dec 17 05:43:10 EST 2005


Do Re Mi chel La Si Do wrote:
> That depends on what we call "console".
> 
>     Python console?
> or
>     Windows console?

AFAICT, it works in both: if I start Python 2.4 (command line)
from the start menu, and have it import a module that prints

# -*- coding: iso-8859-1 -*-
print u"Martin v. Löwis"

it will print the umlaut, and the same happends if I start
cmd.exe, run python, and then run the code that makes that
print statement. In either case, the font selected was
"Raster Fonts", and in cmd.exe, the Active code page was
850.

Regards,
Martin



More information about the Python-list mailing list