From 743095cc829e26044fbb12b8a2400a3754691abd Mon Sep 17 00:00:00 2001 From: Liz Rea Date: Thu, 1 Oct 2015 11:32:03 +1300 Subject: [PATCH] Revert "Bug 14813: Fix encoding issues on editing help pages" This reverts commit 16ebbebe4f543990b60b5771488f35b8b619debe. Not actually applicable --- edithelp.pl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/edithelp.pl b/edithelp.pl index f690bd5c25..0166243723 100755 --- a/edithelp.pl +++ b/edithelp.pl @@ -17,12 +17,12 @@ # You should have received a copy of the GNU General Public License # along with Koha; if not, see . -use Modern::Perl; +use strict; use C4::Output; use C4::Templates; use C4::Auth; +use CGI; use warnings; -use CGI qw ( -utf8 ); use vars qw($debug); @@ -77,7 +77,7 @@ sub _get_filepath ($;$) { $type = 'create' if $type eq 'addnew'; if ( $type eq 'create' || $type eq 'save' ) { my $file = _get_filepath($referer); - open my $fh, ">:encoding(utf-8)", $file; + open my $fh, ">", $file; if ( $fh ) { # file is open write to it print $fh @@ -99,13 +99,13 @@ elsif ( $type eq 'modify' ) { } else { (-w $file) or $error = "WARNING: You will not be able to save, because your webserver cannot write to '$file'. Contact your admin about help file permissions."; - open (my $fh, '<:encoding(utf-8)', $file) or die "Cannot read file '$file'"; # unlikely death, since we just checked - my $help = ''; + open (my $fh, '<', $file) or die "Cannot read file '$file'"; # unlikely death, since we just checked + my $help = ''; while ( <$fh> ) { $help .= /\[% INCLUDE .* %\](.*)$/ ? $1 : $_; - } - close $fh; - $template->param( 'help' => $help ); + } + close $fh; + $template->param( 'help' => $help ); $type = 'save'; } } -- 2.39.5