Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > de.comp.lang.python > #5532

cgi raspberry pi utf

From Hermann Riemann <nospam.ng@hermann-riemann.de>
Newsgroups de.comp.lang.python
Subject cgi raspberry pi utf
Date 2019-08-26 10:55 +0200
Message-ID <gshl4uFmbocU1@mid.individual.net> (permalink)

Show all headers | View raw


Ich möchte gerne, wie auch auf intel PCs unter SUsE,
mit raspberry pi Umlaute über cgi und print ausgeben.

Bei SuSE geht das mit der Zeile

sys.stdout=codecs.open("/dev/stdout","w","utf8")

raspberry pi liefert mit dieser Zeile nur eine Fehlermeldung.

Und wenn ich ohne obige Zeile mit print ein utf Zeichen wie
ü ausgeben will, wird das Programm einfach abgebrochen.

Statt print sys.stdout.write zu verwenden,
scheint nicht das gewünschte Ergebnis zu bringen:

 >>> sys.stdout.write("bäh")
bäh3

Woher die 3 am Ende?


Hermann
    der auch utf Zeichen über cgi auf raspberry pi ausgeben mag.
    ( Ohne cgi kein Problem)

-- 
http://www.hermann-riemann.de

Back to de.comp.lang.python | Previous | NextNext in thread | Find similar


Thread

cgi raspberry pi utf Hermann Riemann <nospam.ng@hermann-riemann.de> - 2019-08-26 10:55 +0200
  Re: [Python-de] cgi raspberry pi utf Hartmut Goebel <h.goebel@goebel-consult.de> - 2019-08-26 11:09 +0200
  Re: [Python-de] cgi raspberry pi utf Kaeptm Blaubaer <kaeptmblaubaer1000@gmail.com> - 2019-08-28 13:26 +0200

csiph-web