Reputation: 25117
Is there a way to influence the encoding of the save_content()-method from WWW::Mechanize
?
Upvotes: 0
Views: 405
Reputation: 25117
or I could write it this way
open my $fh, '>:encoding(utf-8)', $file_name or die $!;
my $res = $mech->get( $url, ':content_cb' => sub{ print $fh shift } );
Upvotes: 0
Reputation: 62099
No. If you need to do that, open a file yourself (specifying whatever encoding you want) and print $mech->content
to it.
Upvotes: 2