Skip Menu |

This queue is for tickets about the XML-Atom CPAN distribution.

Report information
The Basics
Id: 18974
Status: resolved
Priority: 0/
Queue: XML-Atom

People
Owner: Nobody in particular
Requestors: ryantate [...] ryantate.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.19
Fixed in: (no value)



Subject: XML::Atom turns off utf8 flag for valid, decoded utf8 document
Hello, I find the XML::Atom module very useful, and it has saved me a lot of time! Thank you. However - At numerous places in XML::Atom::Thing, Encode::_utf8_off is called on a field of an Atom entry. For example, in get, getlist and as_xml. This seems to be done without regard to how the utf8 flag was set. In my case, my code very carefully sniffs the atom encoding (using the module HTML::Encoding, which includes XML support) and then calls Encode::decode to convert to utf-8 and set the utf8 flag, all *before* I parse the feed with XML::Atom (via XML::Feed). After I get the entry back from XML::Atom, I have to manually turn the flag back on. I do not understand this behavior of the module. If I decode the whole XML document, I should not have to re-decode each entry.
This was fixed in 0.20. On Fri Apr 28 16:16:18 2006, guest wrote: Show quoted text
> Hello, > > I find the XML::Atom module very useful, and it has saved me a lot of > time! Thank you. > > However - At numerous places in XML::Atom::Thing, Encode::_utf8_off
is Show quoted text
> called on a field of an Atom entry. For example, in get, getlist and
as_xml. Show quoted text
> > This seems to be done without regard to how the utf8 flag was set.
In my Show quoted text
> case, my code very carefully sniffs the atom encoding (using the
module Show quoted text
> HTML::Encoding, which includes XML support) and then calls > Encode::decode to convert to utf-8 and set the utf8 flag, all
*before* I Show quoted text
> parse the feed with XML::Atom (via XML::Feed). > > After I get the entry back from XML::Atom, I have to manually turn
the Show quoted text
> flag back on. I do not understand this behavior of the module. If I > decode the whole XML document, I should not have to re-decode each
entry.