[erlang-questions] Bug in xmerl

Mikkel Jensen <>
Thu Jun 26 16:09:44 CEST 2008

It seems there is a bug in xmerl when loading elements that contain numeric
character references followed by UTF-8 characters.

Example: é newline é

1> element(1, xmerl_scan:string("<a>\303\251&#xD;\303\251</a>", [{encoding,

Xmerl splits the parsed value around the newline character (strange but ok).
However, the first part is encoded correctly while the second part is

It's worth noticing that attribute values are encoded correctly:

2> element(1, xmerl_scan:string("<a b=\"\303\251&#xD;\303\251\"/>",
[{encoding, 'utf-8'}])).
            [{xmlAttribute,b,[],[],[],[],1,[],"\303\251 \303\251",false}],

Can someone confirm if this is a bug?

- Mikkel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080626/2b89518f/attachment.html>

More information about the erlang-questions mailing list