[XML-SIG] sgmlop and html parsing

Alexandre Fayolle Alexandre.Fayolle at logilab.fr
Tue Jan 13 09:10:25 EST 2004


Hello,

I got a bug report about ns_parse.py in demo/xbel 

The problem is when, parsing a netscape bookmark file with &#xNN;
character entities where xNN > x7F because this causes a ValueError in
sgmlop:

Traceback (most recent call last):
  File "/usr/bin/ns_parse", line 142, in ?
    the_parser.parse(file)
  File
"/usr/lib/python2.3/site-packages/_xmlplus/sax/drivers2/drv_sgmlop.py",
line 50, in parse
    self.feed(buffer)
ValueError: character reference ä exceeds ASCII range

I've looked in the code, and I'm not sure how I can handle this, because
encoding issues in drv_sgmlop.py only seem to be handled in the callback
methods, and this problem occurs during before callbacks get called. 

Any help welcome. 

-- 
Alexandre Fayolle
LOGILAB, Paris (France).
http://www.logilab.com   http://www.logilab.fr  http://www.logilab.org
Développement logiciel avancé - Intelligence Artificielle - Formations



More information about the XML-SIG mailing list