Can't print Chinese to HTTP
Gnarlodious
gnarlodious at gmail.com
Tue Dec 1 10:51:19 EST 2009
On Dec 1, 8:36 am, Lie Ryan wrote:
> #!/usr/bin/python
> import sys
> print = lambda s: sys.stdout.buffer.write(s.encode('utf-8'))
> print("Content-type:text/plain;charset=utf-8\n\n")
> print('晉\n')
HA! IT WORKS! Thank you thank you thank you. I don't understand the
lambda functionality but will figure it out. BTW this is OSX 10.6 and
Python 3.1.1.
Again, thank you for the help.
-- Gnarlie
More information about the Python-list
mailing list