[issue6852] Unicode IO not working in cgi applet

2009-09-07 Thread Mark Dickinson
Mark Dickinson added the comment: I don't think this is a Python bug; it has to do with the stdout encoding. When connected to a terminal, sys.stdout.encoding is (probably, on Ubuntu) UTF-8, but when you're using this as a cgi script it's likely to be defaulting to ascii instead. Not surpr

[issue6852] Unicode IO not working in cgi applet

2009-09-06 Thread loveminix
New submission from loveminix : The following cgi applet does output Unicode string correctly in an Ubuntu terminal, but when invoked from a web browser (IE or Firefox) by a client, it doesn't output the Unicode string. Output stops at "...", right before the Unicode string "中文". #! /usr/bin/pyt