From f91719a94e80852f06fc04e6bc306fe32fdbbbe4 Mon Sep 17 00:00:00 2001 From: Nahuel ANGELINETTI Date: Tue, 1 Jun 2010 13:54:53 +0200 Subject: [PATCH] (bug #4842) check if string is utf8 or not This fix a double encoding problem in serial receive. --- C4/Serials.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/C4/Serials.pm b/C4/Serials.pm index 2f5f27f706..2f727627fc 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 ); } -- 2.39.5