我們安裝了一個ASSP(反垃圾郵件SMTP代理)v2.3.3.13217(最後一個)(在Ubuntu Server 13.04上)。經過一段時間它開始在控制檯打印:在主打印中的寬字符::第30行的mlogWrite(ASSP)
...
Wide character in print at sub main::mlogWrite line 30
Wide character in print at sub main::mlogWrite line 32
Wide character in print at sub main::mlogWrite line 30
Wide character in print at sub main::mlogWrite line 32
...
依此類推。
下面是來自assp.pl此子:
sub mlogWrite {
return if $WorkerNumber;
my @m;
my $items;
threads->yield();
&debugWrite();
threads->yield;
$items = $mlogQueue->pending();
$refreshWait = (time - $lastmlogWrite) > 5 ? 5 : 1;
return if (! $items);
threads->yield();
@m = $mlogQueue->dequeue_nb($items);
threads->yield();
my @tosyslog;
while (@m) {
my $logline = my $line = de8(shift @m);
if ($Unidecode2Console) {
eval{
$line = Text::Unidecode::unidecode($line);
} or print "con uni-decoding error: [email protected]";
} else {
eval{
Encode::from_to($line,'UTF-8',$ConsoleCharset,sub { return '?'; })
if $ConsoleCharset && $ConsoleCharset !~ /utf-?8/oi;
1;
} or print "con encoding error: [email protected]";
}
push @tosyslog,substr($line,length($LogDateFormat)) if ($sysLog && ($CanUseSyslog || ($sysLogPort && $sysLogIp)));
if ($line !~ /\*\*\*assp\&is\%alive\$\$\$/o) {
print $line unless ($silent);
w32dbg($line) if ($CanUseWin32Debug);
print $LOG $logline if ($logfile && $asspLog && fileno($LOG));
print $LOGBR $logline if ($logfile &&
$asspLog &&
fileno($LOGBR) &&
$ExtraBlockReportLog &&
$logline =~ /\[\s*spam\sfound\s*\]/io);
}
if ($logline !~ /page:\/maillog/o) {
shift @RealTimeLog if (@RealTimeLog > 33);
push @RealTimeLog, $logline;
$lastmlogWrite = time;
}
}
tosyslog('info', \@tosyslog) if (@tosyslog && $sysLog && ($CanUseSyslog || ($sysLogPort && $sysLogIp)));
$MainThreadLoopWait = 1;
}
我非常非常抱歉,但我不知道的Perl。這裏的錯誤在哪裏?
http://stackoverflow.com/a/15222005/223226 –