[New-bugs-announce] [issue18917] python won't display greek characters in apache under windows

Nick report at bugs.python.org
Wed Sep 4 05:59:43 CEST 2013


New submission from Nick:

I've set up apache on Windows 7 and I'm running python with cgi.

I have a script that contains this:
#!C:\Python34\python.exe
print ("Content-Type: text/html; charset=utf-8\n")
print ("Δοκιμή")

Pretty simple, right? When I'm opening the page to my browser in stead of "Δοκιμή" I get weird ��� symbols (when the browser is set on UTF-8) If I set my browser to ISO-8859-7 I will get the normal greek letters.

"sys.stdout.encoding" will display "cp1253" instead of "utf-8" as it probably should.

scripts with only english characters will work totally fine. the problems seems to be on non-english characters. it displays them as ISO-8859-7.

this doesn't seem to be an apache or windows issue as PHP and Lua will run just fine and all the scripts will display greek characters in my browser. the problem occurs only with python.

----------
messages: 196886
nosy: nickl1
priority: normal
severity: normal
status: open
title: python won't display greek characters in apache under windows
type: behavior
versions: Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18917>
_______________________________________


More information about the New-bugs-announce mailing list