[Python-de] print von Nicht-ASCII-Zeichen
"Martin v. Löwis"
martin at v.loewis.de
Mon Aug 28 18:10:32 CEST 2006
Diez B. Roggisch schrieb:
> Ich weiss nicht genau, wie python dazu kommt ein encoding an sys.stdout zu
> pappen - und es kann sein, das dies unter bestimmten Umstaenden eben nicht
> geht.
Unter Unix wird setlocale(LC_CTYPE, "");nl_langinfo(CODESET) aufgerufen,
falls isatty(stdout). Unter Windows with GetConsoleOutputCP() gerufen,
falls isatty(stdout). Ansonsten ist sys.stdout.encoding None.
Ciao,
Martin
More information about the python-de
mailing list