[XML-SIG] xmlproc bug?

Rich Salz rsalz@zolera.com
Fri, 04 May 2001 15:36:27 -0400


If you feed() a unicode string into an xmlproc parser, Python barfs at
line 234
     # ignore unusal byte orders 2143 and 3412
     elif new_data[:2] == '\xfe\xff':
         enc = "utf-16-be" # with BOM

because apparently it is trying to convert the string to unicode and
it's got 8bit characters.

Not sure what the right thing to do is.  here's a three-line script that
shows the fault

from xml.parsers.xmlproc import xmlproc
z = xmlproc.XMLProcessor()
z.feed(u'<foo/>')

	/r$