Can't print Chinese to HTTP
gnarlodious at gmail.com
Sat Dec 5 04:57:54 CET 2009
On Dec 1, 3:06 pm, Terry Reedy wrote:
> def print(s): return sys.stdout.buffer.write(s.encode('utf-8'))
Here is a better solution that lets me send any string to the
def print(html): return sys.stdout.buffer.write(("Content-type:text/
Why this changed in Python 3 I do not know, nor why it was nowhere to
be found on the internet.
Can anyone explain it?
Anyway, I hope others with this problem can find this solution.
More information about the Python-list