[mod_python] encodings (codecs)

Michael Krasnovsky mk at lrn.ru
Sat Aug 17 21:46:04 EST 2002


I have a problem using encode() method of a string object inside my
publisher handlers. I get LookupError: unknown encoding. 
Here is the sample.

def test(req):
	cnt = "Hello, World Wide!"
	return cnt.encode("utf-8")

BTW, this function works fine being called not from mod_python handler.

How could it be fixed?



More information about the Mod_python mailing list