http://www.perlmonks.org?node_id=996965


in reply to Login to Java site with WWW::Scripter charset issue

http://search.cpan.org/grep?cpanid=SPROUT&release=WWW-Scripter-0.029&string=charset&i=1&n=1&C=3 and http://search.cpan.org/grep?cpanid=SPROUT&release=WWW-Scripter-0.029&string=Content.Type&i=1&n=1&C=3

suggest the problem is with the website, either the html or the javascript is setting the charset erroneously, and scripter obliges

So, since Scripter is a LWP subclass, you might see http://search.cpan.org/perldoc/LWP::UserAgent#Handlers and http://search.cpan.org/perldoc/HTTP::Config#Matching like

my $umf = URI->new( $urlLogin ); $scripter->add_handler( request_prepare => sub { my($request, $ua, $h) = @_ ->content_type_charset return; }, m_scheme => $umf->scheme, # only call this handler m_host => $umf->host, # for this host ... );