error in
Christopher Blunck
blunck at gst.com
Fri May 9 00:05:50 EDT 2003
dharms98 at yahoo.com (Dan Harms) wrote in message news:<6703f28d.0304281917.602c680 at posting.google.com>...
> blunck at gst.com (Christopher Blunck) wrote in message news:<1147e466.0304271906.113457ad at posting.google.com>...
> > Mod_Python executes your modules using restricted execution mode.
>
> I don't think it does. According to this, this is more likely a Python 2.2.1 bug:
>
> http://www.modpython.org/pipermail/mod_python/2002-October/002607.html
The folks at mod_python gave me a pointer in the right direction. To
get PyXML
working under mod_python + Apache 2.0.40 + python 2.2.x, you must do
this prior to defining your handler method:
mod = __import__('encodings.utf_8', globals(), locals(), '*')
mod = __import__('encodings.utf_16_be', globals(), locals(), '*')
Of course, this is somewhat hackish because one isn't suppose to know
the encodings of an XML message prior to manipulating / parsing it.
But, it solves the imeediate problem, and most XML docs are UTF8 or
UTF16 formatted.
Hope this helps anyone. Tried this under RH9 and it worked.
More information about the Python-list
mailing list