[Koha-patches] [PATCH] (bug #4842) check if string is utf8 or not

Nahuel ANGELINETTI nahuel.angelinetti at biblibre.com
Tue Jun 1 13:56:39 CEST 2010


This fix a double encoding problem in serial receive.
---
 C4/Serials.pm |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/C4/Serials.pm b/C4/Serials.pm
index 2f5f27f..2f72762 100644
--- a/C4/Serials.pm
+++ b/C4/Serials.pm
@@ -1110,7 +1110,6 @@ Note : if we change from "waited" to something else,then we will have to create
 sub ModSerialStatus {
     my ( $serialid, $serialseq,  $planneddate,$publisheddate, $status, $notes )
       = @_;
-
     #It is a usual serial
     # 1st, get previous status :
     my $dbh   = C4::Context->dbh;
@@ -1141,7 +1140,9 @@ sub ModSerialStatus {
             $sth->execute($subscriptionid);
             my ( $missinglist, $recievedlist ) = $sth->fetchrow;
             if ( $status eq 2 ) {
-
+                 if (not utf8::is_utf8($serialseq)){
+                    utf8::decode($serialseq);
+                 }
                 $recievedlist .= "; $serialseq"
                   unless ( index( "$recievedlist", "$serialseq" ) >= 0 );
             }
-- 
1.7.0.4



More information about the Koha-patches mailing list