Bugzilla – Attachment 17501 Details for
Bug 10068
Move from the utf8:: pragma methods to Encode::
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10068 - Replace the utf8 pragma at acqui/booksellers.pl
Bug-10068---Replace-the-utf8-pragma-at-acquibookse.patch (text/plain), 1.39 KB, created by
Tomás Cohen Arazi (tcohen)
on 2013-04-17 13:52:01 UTC
(
hide
)
Description:
Bug 10068 - Replace the utf8 pragma at acqui/booksellers.pl
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2013-04-17 13:52:01 UTC
Size:
1.39 KB
patch
obsolete
>From b1bb2651762e350b9b4c94de41c99eb0ccd2f472 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@gmail.com> >Date: Tue, 16 Apr 2013 16:49:16 -0300 >Subject: [PATCH] Bug 10068 - Replace the utf8 pragma at acqui/booksellers.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/booksellers.pl | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > >diff --git a/acqui/booksellers.pl b/acqui/booksellers.pl >index 394ae92..94b9827 100755 >--- a/acqui/booksellers.pl >+++ b/acqui/booksellers.pl >@@ -60,6 +60,8 @@ use C4::Acquisition qw/ GetBasketsInfosByBookseller /; > use C4::Bookseller qw/ GetBookSellerFromId GetBookSeller /; > use C4::Members qw/GetMember/; > use C4::Context; >+use Carp; >+use Encode qw/decode/; > > my $query = CGI->new; > my ( $template, $loggedinuser, $cookie ) = get_template_and_user( >@@ -73,8 +75,10 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > ); > > #parameters >-my $supplier = $query->param('supplier'); >-utf8::decode($supplier); >+my $supplier = $query->param( 'supplier' ); >+eval { $supplier = decode('UTF-8', $supplier, Encode::FB_CROAK); }; >+if ( $@ ) { carp "Error decoding $supplier: $@" }; >+ > my $booksellerid = $query->param('booksellerid'); > my @suppliers; > >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 10068
:
17501
|
17502
|
17503
|
17504
|
17505
|
17506
|
17507