Bugzilla – Attachment 17506 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 C4/Installer.pm
Bug-10068---Replace-the-utf8-pragma-at-C4Installer.patch (text/plain), 1.79 KB, created by
Tomás Cohen Arazi (tcohen)
on 2013-04-17 13:52:55 UTC
(
hide
)
Description:
Bug 10068 - Replace the utf8 pragma at C4/Installer.pm
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2013-04-17 13:52:55 UTC
Size:
1.79 KB
patch
obsolete
>From a94a26fa7d4c46f63a9b6b6f1dc24283bb4cf83f Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@gmail.com> >Date: Wed, 17 Apr 2013 10:40:07 -0300 >Subject: [PATCH] Bug 10068 - Replace the utf8 pragma at C4/Installer.pm >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >utf8::encode($string) for Encode::encode('UTF-8',$string) > >Added Carp and error handling. > >Sponsored-by: Universidad Nacional de Córdoba >--- > C4/Installer.pm | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > >diff --git a/C4/Installer.pm b/C4/Installer.pm >index 5bb9662..73d55fc 100644 >--- a/C4/Installer.pm >+++ b/C4/Installer.pm >@@ -23,6 +23,7 @@ use strict; > our $VERSION = 3.07.00.049; > use C4::Context; > use C4::Installer::PerlModules; >+use Encode; > > =head1 NAME > >@@ -156,8 +157,8 @@ sub marc_framework_sql_list { > open my $fh, "<:encoding(UTF-8)", "$dir/$requirelevel/$name.txt"; > my $lines = <$fh>; > $lines =~ s/\n|\r/<br \/>/g; >- use utf8; >- utf8::encode($lines) unless ( utf8::is_utf8($lines) ); >+ >+ $lines = encode('UTF-8',$lines) unless ( utf8::is_utf8($lines) ); > my $mandatory = ($requirelevel =~ /(mandatory|requi|oblig|necess)/i); > push @frameworklist, > { >@@ -234,8 +235,8 @@ sub sample_data_sql_list { > open my $fh , "<:encoding(UTF-8)", "$dir/$requirelevel/$name.txt"; > my $lines = <$fh>; > $lines =~ s/\n|\r/<br \/>/g; >- use utf8; >- utf8::encode($lines) unless ( utf8::is_utf8($lines) ); >+ >+ $lines = encode('UTF-8',$lines) unless ( utf8::is_utf8($lines) ); > my $mandatory = ($requirelevel =~ /(mandatory|requi|oblig|necess)/i); > push @frameworklist, > { >-- >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