Adding Asian text error with IIS

Panupat Chongstitwattana panupatc at
Wed Feb 2 05:35:35 CET 2011

I created a very simple script, testing it out with web browser.

# -*- coding: utf-8 -*-
import sys

f = 'ฟ'
print "Content-Type: text/plain;charset=utf-8"
print f

 The moment I have an Asian text in my file (without doing anything to it at
all) I always get a 502 error - web server received an invalid response. The
script prints out just fine if I use python own IDLE however.

The file was utf-8 encoded and setdefaultencoding is also utf-8. Testing out
on windows server 2008 R2 IIS 7.5.

Any help greatly appreciate!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list