Bugzilla – Attachment 41113 Details for
Bug 14584
Encoding broken with system preferences
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14584 - Encoding broken with system preferences
Bug-14584---Encoding-broken-with-system-preference.patch (text/plain), 1.18 KB, created by
Blou
on 2015-07-21 20:12:10 UTC
(
hide
)
Description:
Bug 14584 - Encoding broken with system preferences
Filename:
MIME Type:
Creator:
Blou
Created:
2015-07-21 20:12:10 UTC
Size:
1.18 KB
patch
obsolete
>From 36dc61d63c811826d98097b5defb65de581c5262 Mon Sep 17 00:00:00 2001 >From: Blou <philippe.blouin@inlibro.com> >Date: Tue, 21 Jul 2015 16:07:59 -0400 >Subject: [PATCH] Bug 14584 - Encoding broken with system preferences >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >This prevents double-encoding the strings from the database's systempreferences. > >STEP >1) You need an accentuated language installed. >2) Go to NoLoginInstructions pref, and add some accentuated message like "Hélo médames é mècieüx" >3) refresh opac home page, message should be gibberish >4) apply patch. Message should be ok now. >--- > Koha/Template/Plugin/Koha.pm | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/Koha/Template/Plugin/Koha.pm b/Koha/Template/Plugin/Koha.pm >index ecb6266..f94579b 100644 >--- a/Koha/Template/Plugin/Koha.pm >+++ b/Koha/Template/Plugin/Koha.pm >@@ -43,7 +43,8 @@ is necessary. > > sub Preference { > my ( $self, $pref ) = @_; >- return encode('UTF-8', C4::Context->preference( $pref ) ); >+ my $str = C4::Context->preference( $pref ); >+ return C4::Charset::IsStringUTF8ish($str) ? $str : encode('UTF-8', $str); > } > > sub Version { >-- >2.1.0
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 14584
:
41113
|
41632
|
41641
|
42183