in reply to Re^2: Entities confuse encoding in XML::Simple
in thread Entities confuse encoding in XML::Simple

Did you find a solution? I'm having the same problem as you.
  • Comment on Re^3: Entities confuse encoding in XML::Simple

Replies are listed 'Best First'.
Re^4: Entities confuse encoding in XML::Simple
by gizzlon (Initiate) on Jan 09, 2008 at 18:02 UTC
    kind of, but its more of workaround. I juts go through the xml and replace every & with an &amp before I pass it on to XMLin.
    Something like:
    my @xml = <FILE>; # slurp .. close(FILE); foreach( @xml){ # Ugly hack to keep XML::Simple(?) from double encoding certain stri +ngs, # see: perlmonks.org/index.pl?node_id=660162 and perlmonks.org/index +.pl?node_id=215678 s/&/&amp;/g; }
    I _think_ number entities like &x### are legal in xml and should be either left untouched or maybe "converted" into the utf8 char?
    anyone?