SGMLParser eats ä etc

ddubin ddubin at
Wed Dec 3 16:51:49 CET 2003

Anders Eriksson <ameLista at> writes:

> the strange thing is that the Character entity (i.e. å) is
> stripped from the text. I don't want to change it since I'm feeding
> the output to a browser.

Inconvenient for you, but not strange. An SGML parser is supposed to
expand general entity references.
> I will try the HTMLParser instead but it seems to me that there is a
> bug in SMGLParser...

No, it's consistent with the standard that the entity reference
disappears. The question is what replacement text has been put in its
place, and why can't you see it?

Dave Dubin

More information about the Python-list mailing list