Minor fix to UTF8 support
authordjfiander <djfiander>
Wed, 13 Jan 2010 01:38:31 +0000 (01:38 +0000)
committerdjfiander <djfiander>
Wed, 13 Jan 2010 01:38:31 +0000 (01:38 +0000)
Sip.pm

diff --git a/Sip.pm b/Sip.pm
index 9bac051..ff96815 100644 (file)
--- a/Sip.pm
+++ b/Sip.pm
@@ -197,6 +197,7 @@ sub write_msg {
     my ($self, $msg, $file) = @_;
     my $cksum;
 
+    $msg = encode_utf8($msg);
     if ($error_detection) {
        if (defined($self->{seqno})) {
            $msg .= 'AY' . $self->{seqno};
@@ -211,7 +212,7 @@ sub write_msg {
        print $file "$msg\r";
     } else {
        print "$msg\r";
-       syslog("LOG_INFO", encode_utf8("OUTPUT MSG: '$msg'"));
+       syslog("LOG_INFO", "OUTPUT MSG: '$msg'");
     }
 
     $last_response = $msg;