sub init {
my $q = CGI->new;
for my $param ($q->param) {
if ($param =~ /^(.+)$/) {
$Params::vars{$1} .= fix_utf($q->param($param));
}
}
$q->delete_all();
}
sub fix_utf {
my $par = shift;
my $res = '';
# decode obtained value to utf8 string if needed
$res = Encode::decode_utf8($par) if !Encode::is_utf8($par);
print STDERR "value: '$par'\n"
"\tflg1: \t", Encode::is_utf8($par) ? 1 : 0, "\n",
"\tflg2: \t", Encode::is_utf8($res) ? 1 : 0, "\n";
# # set utf8 flag if previous operation failed
# Encode::_utf8_on($res) if !Encode::is_utf8($res);
# print STDERR "\tflg3: \t", Encode::is_utf8($res) ? 1 : 0, "\n";
return $res;
}
####
value: 'some note'
flg1: 0 - original
flg2: 0 - after decode_utf8()
flg3: 0 - after _utf8_on()
##
##
Use of uninitialized value in require at (eval 35) line 6, line 9 (#2)
[Fri Dec 5 16:23:17 2003] -e: Use of uninitialized value in require at (eval 35) line 6, line 9.
[Fri Dec 5 16:23:17 2003] -e: Use of uninitialized value in require at (eval 35) line 6, line 9.
Use of uninitialized value in require at /usr/lib/perl5/5.8.0/utf8_heavy.pl
line 64, line 9 (#2)
[Fri Dec 5 16:23:17 2003] -e: Use of uninitialized value in require at /usr/lib/perl5/5.8.0/utf8_heavy.pl line 64, line 9.
[Fri Dec 5 16:23:17 2003] -e: Use of uninitialized value in require at /usr/lib/perl5/5.8.0/utf8_heavy.pl line 64, line 9.
Use of uninitialized value in require at /usr/lib/perl5/5.8.0/utf8_heavy.pl
line 78, line 9 (#2)
[Fri Dec 5 16:23:17 2003] Exact.pl: Use of uninitialized value in require at /usr/lib/perl5/5.8.0/utf8_heavy.pl line 78, line 9.
[Fri Dec 5 16:23:17 2003] Exact.pl: Use of uninitialized value in require at /usr/lib/perl5/5.8.0/utf8_heavy.pl line 78, line 9.
Use of uninitialized value in do "file" at /usr/lib/perl5/5.8.0/utf8_heavy.pl
line 137, line 9 (#2)
[Fri Dec 5 16:23:17 2003] -e: Use of uninitialized value in do "file" at /usr/lib/perl5/5.8.0/utf8_heavy.pl line 137, line 9.
[Fri Dec 5 16:23:17 2003] -e: Use of uninitialized value in do "file" at /usr/lib/perl5/5.8.0/utf8_heavy.pl line 137, line 9.