in reply to Re: encoding failure with XML::Twig
in thread encoding failure with XML::Twig

Thank you both, you're saints. I'll try to explain better in future posts, that was a bit confusing.

That solved the issue in my example, but I'm still having the problem in my main script. Should that go before all use statments, or just directly before use XML::Twig?

Apparently Expat has 4 embedded encoding formats and if it's not one of those 4 it looks at the Encodings directory. windows-1252 isn't one of the 4 embedded. Parser doesn't include this directory by default.

Replies are listed 'Best First'.
Re^3: encoding failure with XML::Twig
by ikegami (Patriarch) on Nov 20, 2009 at 19:30 UTC

    Should that go before all use statments, or just directly before use XML::Twig?

    As early as you want. It was to be before any direct or indirect call to use XML::Parser::Expat;, so the earlier the safer.

    I tried installing pp to do some debugging, but it's crashing. Sorry, I can't help you more than this.