Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the WWW-Mechanize CPAN distribution.

Report information
The Basics
Id: 44533
Status: rejected
Priority: 0/
Queue: WWW-Mechanize

Owner: Nobody in particular
Requestors: FANY [...]
way [...]

Bug Information
Severity: Critical
Broken in: 1.54
Fixed in: 1.34

Subject: Wrong encoding sent at url
Download (untitled) / with headers
text/plain 243b
When Mechanize send an url it always use UTF-8/utf8 encoding, but many site only spect her own enconding. This issue fail at v1.54 but is correct at v1.34 Here's a discution about this on Perlmonks: node_id=752170
Download (untitled) / with headers
text/plain 563b
The following workaround works for me: package my::WWW::Mechanize; use base 'WWW::Mechanize'; use Encode qw(encode); sub update_html { my ( $self, $html ) = @_; $self->SUPER::update_html( encode( $self->response->encoding, $html ) ); } You will also have to submit accordingly encoded values to field methods to prevent automatical utf8 upgrades within URI's ->query_form() method, e.g. my $encoding = $mech->response->encoding; $mech->submit_form( fields => { map encode( $encoding, $_ ), ... } ); Regards, fany
Download (untitled) / with headers
text/plain 137b
Please repost this ticket at That is the proper place to post Mech tickets. Thanks.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to