In read_SIP_packet(), we decode the incoming packet as UTF8 and then
encode it again before writing to the log, but not before returning the
message. We were instead encoding the incoming message in a subsequent
call, which is not the recommended Perl practice of decoding input and
encoding output.
Signed-off-by: Dan Scott <dscott@laurentian.ca>
#
# This is now handled by the vigorous cleansing above.
syslog("LOG_INFO", encode_utf8("INPUT MSG: '$record'")) if $record;
- return $record;
+ return encode_utf8($record);
}
#
my ($self, $msg, $file) = @_;
my $cksum;
- $msg = encode_utf8($msg);
if ($error_detection) {
if (defined($self->{seqno})) {
$msg .= 'AY' . $self->{seqno};