in reply to Re^2: Help for "Cannot decode string with wide characters..." and CGI.pm
in thread Help for "Cannot decode string with wide characters..." and CGI.pm
#!/usr/bin/perl -l BEGIN { $| = 1;} use strict; use warnings; use utf8; use Encode; use CGI qw/:standard -utf8/; use CGI::Carp qw/fatalsToBrowser set_message/; $CGI::PARAM_UTF8 = 1; BEGIN { sub handle_errors { my $msg = shift; print "<h1>There's a problem</h1>"; print "<p>Cannot decode string: $msg</p>"; } set_message(\&handle_errors); } my $q = CGI->new; binmode STDOUT, ":encoding(UTF-8)"; my $referer_url = "@{[ $q->url ];}"; print $referer_url;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Help for "Cannot decode string with wide characters..." and CGI.pm
by PerlBroker (Acolyte) on Apr 08, 2012 at 17:26 UTC | |
by Anonymous Monk on Apr 09, 2012 at 01:31 UTC | |
|
Re^4: Help for "Cannot decode string with wide characters..." and CGI.pm
by PerlBroker (Acolyte) on Apr 08, 2012 at 16:57 UTC | |
by Khen1950fx (Canon) on Apr 08, 2012 at 17:05 UTC |