This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author nickl1
Recipients nickl1
Date 2013-09-04.03:59:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1378267183.66.0.904044097978.issue18917@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2013-09-04 03:59:43nickl1setrecipients: + nickl1
2013-09-04 03:59:43nickl1setmessageid: <1378267183.66.0.904044097978.issue18917@psf.upfronthosting.co.za>
2013-09-04 03:59:43nickl1linkissue18917 messages
2013-09-04 03:59:42nickl1create