XML can't read Unicode shock horror. News at 11.
dale at riverhall.NOTHANKS.co.uk
Tue Oct 30 15:04:56 CET 2001
Dale Strickland-Clark <dale at riverhall.NOTHANKS.co.uk> wrote:
>Given that XML is very Unicode friendly, this seems a rather odd
>>>> import xml.dom.minidom
>>>> dom = xml.dom.minidom.parseString(u'<node/>')
>Traceback (most recent call last):
> File "<interactive input>", line 1, in ?
> File "c:\python21\lib\xml\dom\minidom.py", line 915, in parseString
> return _doparse(pulldom.parseString, args, kwargs)
> File "c:\python21\lib\xml\dom\minidom.py", line 901, in _doparse
> events = apply(func, args, kwargs)
> File "c:\python21\lib\xml\dom\pulldom.py", line 299, in parseString
> buf = StringIO(string)
>TypeError: expected string, unicode found
I see that this is probably the same as Python bug #216388 which has
been around for over a year and been given a low priority (3).
Is there any chance that this might be elevated?
Non-unicode XML is a bit restrictive. :-(
Riverhall Systems Ltd
More information about the Python-list