#!/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;
In reply to Re^3: Help for "Cannot decode string with wide characters..." and CGI.pm
by Khen1950fx
in thread Help for "Cannot decode string with wide characters..." and CGI.pm
by PerlBroker
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |