Subject: | XML::Twig keep_encoding option fails if previous XML::Twig found a special case. |
I have attached a tarball that contains the problem_case.t, as well as
other demonstration code, and associated test_data files.
The problem arises only if one needs to use the keep_encoding option.
We need to use it for processing XML documents that can contain special
unicode characters, such as bullets, as well as XML that may have been
saved in a file format other than utf-8.
The problem occurs if an XML::Twig is constructed without the
keep_encoding set, and the twig->parse() is called on content that
contains the XML element <Chapter>.
Subsequent XML::Twigs, which need to have the keep_encoding set will
fail to process special characters properly:
# got: '<Chapter>The Bullet⢠you install:</Chapter>'
# expected: '<Chapter>The Bullet• you install:</Chapter>'
I have not had time to resolve why it is the <Chapter> causes this
problem. But it appears to be uniq, since <Chapters>, <chapter> and
<Chapte> will not cause the error.
Subject: | xml_twig_error.tar |
Message body not shown because it is not plain text.