Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Here's the solution I employ in my own hacked copy of Test::WWW::Mechanize::Catalyst, which I submitted to RT [cpan.org].

           if ($response->header('Content-Type') &&
               $response->header('Content-Type') =~ m/charset=(\S+)/xms) {
              my $encoding = $1;
              $response->content(Encode::decode($encoding, $response->content));
           }

    So far, that's worked great fo