[web-devel] Clean up decodeEntities

Yitzchak Gale gale at sefer.org
Thu Jun 9 17:02:33 CEST 2011

The decodeEntities function in xml-enumerator re-invents the wheel that
already exists in the text package for decoding character entities.
As usual in such cases, the implementation is not only much longer and
more complicated, but also incomplete. For example, an entity whose value
is invalid for Unicode will cause the Enum instance of Char to call error
instead of raising an XmlException.

Attached is a patch that uses existing library functions to do the
conversion correctly.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: decodeEntities.patch
Type: text/x-patch
Size: 2763 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/web-devel/attachments/20110609/18da8057/attachment.bin>

More information about the web-devel mailing list