From f38d030ed9bb2579bcc4675da513d0efdc019c96 Mon Sep 17 00:00:00 2001 From: kohaadmin Date: Thu, 18 Feb 2010 15:16:47 +0100 Subject: [PATCH] SIP2 utf8 encoding Signed-off-by: Henri-Damien LAURENT --- C4/SIP/ILS.pm | 3 ++- C4/SIP/ILS/Item.pm | 3 ++- C4/SIP/Sip.pm | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/C4/SIP/ILS.pm b/C4/SIP/ILS.pm index c42d21a70a..9e195d9313 100644 --- a/C4/SIP/ILS.pm +++ b/C4/SIP/ILS.pm @@ -7,6 +7,7 @@ package ILS; use warnings; use strict; use Sys::Syslog qw(syslog); +use Encode; use ILS::Item; use ILS::Patron; @@ -159,7 +160,7 @@ sub checkout { $circ->desensitize(!$item->magnetic); syslog("LOG_DEBUG", "ILS::Checkout: patron %s has checked out %s", - $patron_id, join(', ', @{$patron->{items}})); + $patron_id, join(', ', encode_utf8(@{$patron->{items}}))); } else { syslog("LOG_ERR", "ILS::Checkout Issue failed"); diff --git a/C4/SIP/ILS/Item.pm b/C4/SIP/ILS/Item.pm index 62708a35d7..e52be77eca 100644 --- a/C4/SIP/ILS/Item.pm +++ b/C4/SIP/ILS/Item.pm @@ -22,6 +22,7 @@ use C4::Items; use C4::Circulation; use C4::Members; use C4::Reserves; +use Encode; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK); @@ -109,7 +110,7 @@ sub new { bless $self, $type; syslog("LOG_DEBUG", "new ILS::Item('%s'): found with title '%s'", - $item_id, $self->{title}); + $item_id, encode_utf8($self->{title})); return $self; } diff --git a/C4/SIP/Sip.pm b/C4/SIP/Sip.pm index 558a1d4000..4ebe9f78fc 100644 --- a/C4/SIP/Sip.pm +++ b/C4/SIP/Sip.pm @@ -8,6 +8,7 @@ use strict; use warnings; use English; use Exporter; +use Encode; use Sys::Syslog qw(syslog); use POSIX qw(strftime); @@ -193,7 +194,7 @@ sub read_SIP_packet { sub write_msg { my ($self, $msg, $file) = @_; my $cksum; - + $msg=encode_utf8($msg); if ($error_detection) { if (defined($self->{seqno})) { $msg .= 'AY' . $self->{seqno}; -- 2.39.5