We don't bite newbies here... much | |
PerlMonks |
Re^2: XML::Twig - Parsing XML file with incorrect encoding in declarationby ateague (Monk) |
on Sep 01, 2017 at 23:47 UTC ( [id://1198557]=note: print w/replies, xml ) | Need Help?? |
Can you try slurping in the XML content, and using perl to zap the encoding, before feeding to XML::Twig ? That's what I figured I would need to do (reading in 128 MiB chunks in this case; 73 GiB is a bit much to slurp in all at once ;) ). I just wanted to see if there was an "official" method before I broke out the full brute-force nuclear option. (Of course it probably goes without saying that the ideal solution is to fix this fluster-cluck of an XML travesty...)
EDIT: I just saw the SO link in your update after I posted my reply. That particular example will not work in this because the data is not UTF-16 even though the encoding says otherwise.
In Section
Seekers of Perl Wisdom
|
|