My current approach is a wrapper (not yet tested), I haven't decided yet which approach I like better (or which I detest less ;-)
package MyCGI; use base CGI; use strict; use warnings; use Encode qw(encode); sub param { my $self = shift; if (@_ == 1){ my @val = $self->SUPER::param(@_); @val = map { encode("utf8", $_) } @val; return wantarray ? @val : $val[0]; } else { return $self->SUPER::param(@_); } } 1;
In reply to Re^4: CGI.pm: automatically decode param()
by moritz
in thread CGI.pm: automatically decode param()
by moritz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |