Bugzilla – Attachment 17503 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 admin/preferences.pl
Bug-10068---Replace-the-utf8-pragma-at-adminprefer.patch (text/plain), 1.20 KB, created by
Tomás Cohen Arazi (tcohen)
on 2013-04-17 13:52:21 UTC
(
hide
)
Description:
Bug 10068 - Replace the utf8 pragma at admin/preferences.pl
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2013-04-17 13:52:21 UTC
Size:
1.20 KB
patch
obsolete
>From 953206f9d65c1a463705d8c55f7b6d1d4b4443ef Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@gmail.com> >Date: Wed, 17 Apr 2013 10:15:14 -0300 >Subject: [PATCH] Bug 10068 - Replace the utf8 pragma at admin/preferences.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 >--- > admin/preferences.pl | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/admin/preferences.pl b/admin/preferences.pl >index 2182591..7beaf11 100755 >--- a/admin/preferences.pl >+++ b/admin/preferences.pl >@@ -31,6 +31,8 @@ use C4::Log; > use C4::Output; > use C4::Templates; > use C4::Budgets qw(GetCurrency); >+use Carp; >+use Encode; > use File::Spec; > use IO::File; > use YAML::Syck qw(); >@@ -298,7 +300,8 @@ my @TABS; > > if ( $op eq 'search' ) { > my $searchfield = $input->param('searchfield'); >- utf8::decode($searchfield); >+ eval { $searchfield = decode('UTF-8', $searchfield, Encode::FB_CROAK); }; >+ if ( $@ ) { carp "Error decoding $searchfield: $@" }; > > $searchfield =~ s/\p{IsC}//g; > $searchfield =~ s/\s+/ /; >-- >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