From 5c229cd794ddf5a903859e733accd3f9e62962c8 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Wed, 17 Apr 2013 10:33:14 -0300 Subject: [PATCH] Bug 10068 - Replace the utf8 pragma at acqui/histsearch.pl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit utf8::decode($string) for Encode::decode('UTF-8',$string) Added Carp and error handling. Sponsored-by: Universidad Nacional de Córdoba --- acqui/histsearch.pl | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/acqui/histsearch.pl b/acqui/histsearch.pl index 0d4ea1a..d03d1ce 100755 --- a/acqui/histsearch.pl +++ b/acqui/histsearch.pl @@ -57,24 +57,17 @@ use C4::Output; use C4::Acquisition; use C4::Dates; use C4::Debug; +use Encode; my $input = new CGI; -my $title = $input->param( 'title'); -utf8::decode($title); -my $author = $input->param('author'); -utf8::decode($author); -my $isbn = $input->param('isbn'); -utf8::decode($isbn); -my $name = $input->param( 'name' ); -utf8::decode($name); -my $ean = $input->param('ean'); -utf8::decode($ean); -my $basket = $input->param( 'basket' ); -utf8::decode($basket); -my $basketgroupname = $input->param('basketgroupname'); -utf8::decode($basketgroupname); -my $booksellerinvoicenumber = $input->param( 'booksellerinvoicenumber' ); -utf8::decode($booksellerinvoicenumber); +my $title = decode('UTF-8',$input->param( 'title' )); +my $author = decode('UTF-8',$input->param( 'author' )); +my $isbn = decode('UTF-8',$input->param( 'isbn' )); +my $name = decode('UTF-8',$input->param( 'name' )); +my $ean = decode('UTF-8',$input->param( 'ean' )); +my $basket = decode('UTF-8',$input->param( 'basket' )); +my $basketgroupname = decode('UTF-8',$input->param( 'basketgroupname' )); +my $booksellerinvoicenumber = decode('UTF-8',$input->param( 'booksellerinvoicenumber' )); my $do_search = $input->param('do_search') || 0; my $from_placed_on = C4::Dates->new($input->param('from')); -- 1.7.10.4