Thanks for that ablanke.

I don't understand this change. I've read in a correctly ISO-8859-1 encoded file and used the same encoding layer when opening it. I then pass it to xml2hash and get rubbish out unless I set this ambiguous utf8decode option documented as "Force decoding of utf8 sequences, instead of just upgrading them (may be useful for broken xml)". My XML is not broken.

$ od -c xx.XML 0000000 < ? x m l v e r s i o n = " +1 0000020 . 0 " e n c o d i n g = " I +S 0000040 O - 8 8 5 9 - 1 " ? > \n < x x + 0000060 f e e d t y p e = " d e l t a +" 0000100 > < T i m e s t a m p C r e +a 0000120 t e d T i m e = " 2 0 1 7 - 0 +9 0000140 - 2 1 T 0 6 : 4 9 : 1 7 " T +i 0000160 m e Z o n e = " G M T " / > < +V 0000200 a l u e > B r 370 n d b y I F +< 0000220 / V a l u e > < / x x > \n 0000235

Note the 370 octal which is F8 and "ø". This also looks correct to me:

$ perl -le 'use 5.016;use Devel::Peek; my $xml = do {local $/ = undef; + open(my $fh, "<:encoding(ISO-8859-1)", "xx.XML"); <$fh>;}; say Dump +($xml);' SV = PV(0x1a25da0) at 0x1a3a010 REFCNT = 1 FLAGS = (POK,IsCOW,pPOK,UTF8) PV = 0x1c22ea0 "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n<xx + feedtype=\"delta\"><Timestamp CreatedTime=\"2017-09-21T06:49:17\" Ti +meZone=\"GMT\"/><Value>Br\303\270ndby IF</Value></xx>\n"\0 [UTF8 "<?x +ml version="1.0" encoding="ISO-8859-1"?>\n<xx feedtype="delta"><Times +tamp CreatedTime="2017-09-21T06:49:17" TimeZone="GMT"/><Value>Br\x{f8 +}ndby IF</Value></xx>\n"] CUR = 158 LEN = 160 COW_REFCNT = 1

In reply to Re^2: Problem upgrading XML::Fast from 0.11 to 0.17 by mje
in thread Problem upgrading XML::Fast from 0.11 to 0.17 by mje

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.