The UserAgent value is utterly irrelevant to the encoding problem you are experiencing with XML::LibXML.
Indeed, we established that, however, I need to send the UserAgent in this case, in order to get the content I need, because the site switches on it.

Initially, I didn't see that commenting it out returned a VB error upstream on their end, inside the content, thus delivering me content, but the WRONG content, when the "proper" UserAgent isn't sent in the request. This is why I originally attributed it to a UserAgent error. That is no longer the case. It is an error of encodings, as we have now fleshed out.

In response to your question.. I had version 1.94 of Encode, and just upgraded it to 1.95, with the same results. I'm was also using 2.003 of LWP::UserAgent and 1.53 of XML::LibXML (which I just upgraded to 1.54 from Phish's directory; CPAN didn't seem to notice the newer version). After upgrading, the failures are still the same.

Are you on Windows? Or a POSIX system? It fails here on 3 Linux systems and 1 FreeBSD 4.8 system, all clean installs.


In reply to Re: Crashing XML::LibXML by setting UserAgent by hacker
in thread Crashing XML::LibXML by setting UserAgent by hacker

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.