[erlang-bugs] Bug in xmerl

Mikkel Jensen <>
Fri Jun 27 14:57:26 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}],

- Mikkel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20080627/dc6c2af0/attachment.html>

More information about the erlang-bugs mailing list