[XML-SIG] LookupError: unknown encoding: utf-8 under mod_python

Juergen Hermann jh@web.de
Thu, 16 Jan 2003 00:56:28 +0100


On=2015=20Jan=202003=2015:22:22=20-0200,=20Rodrigo=20B.=20de=20Oliveira=20=
wrote:

><traceback>
>=20=20=20=20data=20=3D=20context.content.document.toxml('utf-8')
>
>=20=20File=20"/usr/local/lib/python2.2/site-packages/_xmlplus/dom/minidom=
.py",
>line=2040,=20in=20toxml
>=20=20=20=20return=20self.toprettyxml("",=20"",=20encoding)
>
>=20=20File=20"/usr/local/lib/python2.2/site-packages/_xmlplus/dom/minidom=
.py",
>line=2049,=20in=20toprettyxml
>=20=20=20=20writer=20=3D=20codecs.lookup(encoding)[3](writer)
>
>LookupError:=20unknown=20encoding:=20utf-8
></traceback>
>
>environment=20is:
>=09*=20python=202.2.2
>=09*=20mod_python=203.0.1
>=09*=20apache=202.0.43
>=09*=20pyxml=200.8.1
>
>I'm=20pretty=20sure=20that=20this=20problem=20is=20more=20related=20to=20=
mod_python=20than=20to
>pyxml=20since=20the=20same=20code=20works=20just=20fine=20when=20executed=
=20from=20the=20shell
>but=20maybe=20you=20know=20something=20about=20it...=20Do=20you?

No,=20it's=20a=20bug=20in=20Python=20itself=20that=20I=20did=20not=20happe=
n=20to=20have=20the=20time=20to=20
describe=20yet.=20Does=20mod_python=20have=20a=20startup=20script=20that=20=
runs=20in=20the=20Apache=20
PARENT,=20before=20forking?

If=20you=20load=20any=20encodings=20used=20later=20there=20(by=20using=20c=
odecs.lookup),=20things=20
will=20start=20to=20work.


Ciao,=20J=FCrgen