[mod_python] encodings (codecs)

Tom Emerson tree at basistech.com
Sat Aug 17 17:14:19 EST 2002


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

Are you sure the version of Python that is being used by mod_python is
the same as the version that is running from the shell? UTF-8 i one of
the built-in encodings, so I don't think you'll get exception unless
the encoding support isn't there at all.

FWIW I use this functionality all the time from the Publisher and it
works fine.

    -tree

-- 
Tom Emerson                                          Basis Technology Corp.
Software Architect                                 http://www.basistech.com
  "Beware the lollipop of mediocrity: lick it once and you suck forever"



More information about the Mod_python mailing list