Bug 8007: Compatibility with bug 11944
This patch should be applied to work with bug 11944. If you don't have 11944 yet, just don't apply this patch. Note that the line binmode(STDOUT); in pl files is mandatory. It comes from bug 11944 that adds the line binmode( STDOUT, ":utf8" ); in C4::Templates::gettemplate. Signed-off-by: Lucie <lucie.rousseaux@dracenie.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
parent
a72cda3d9d
commit
753c8ef6c2
3 changed files with 5 additions and 3 deletions
|
@ -111,7 +111,7 @@ sub generate_as_pdf {
|
|||
my $html_path = tmpnam() . '.html';
|
||||
my $pdf_path = tmpnam() . '.pdf';
|
||||
my $html_content = $tmpl->output;
|
||||
open my $html_fh, '>', $html_path;
|
||||
open my $html_fh, '>:encoding(utf8)', $html_path;
|
||||
say $html_fh $html_content;
|
||||
close $html_fh;
|
||||
my $pdf = PDF::FromHTML->new( encoding => 'utf-8' );
|
||||
|
|
|
@ -29,7 +29,7 @@ Allows librarian to edit and/or manage borrowers' discharges
|
|||
|
||||
use Modern::Perl;
|
||||
|
||||
use CGI;
|
||||
use CGI qw( -utf8 );
|
||||
use C4::Auth;
|
||||
use C4::Output;
|
||||
use C4::Members;
|
||||
|
@ -78,6 +78,7 @@ if ( $input->param('borrowernumber') ) {
|
|||
my $pdf_path = Koha::Borrower::Discharge::generate_as_pdf(
|
||||
{ borrowernumber => $borrowernumber, } );
|
||||
|
||||
binmode(STDOUT);
|
||||
print $input->header(
|
||||
-type => 'application/pdf',
|
||||
-charset => 'utf-8',
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
use Modern::Perl;
|
||||
|
||||
use C4::Auth qw(:DEFAULT get_session);
|
||||
use CGI;
|
||||
use CGI qw( -utf8 );
|
||||
use C4::Context;
|
||||
use C4::Output;
|
||||
use C4::Log;
|
||||
|
@ -59,6 +59,7 @@ elsif ( $op eq 'get' ) {
|
|||
borrowernumber => $loggedinuser
|
||||
});
|
||||
|
||||
binmode(STDOUT);
|
||||
print $input->header(
|
||||
-type => 'application/pdf',
|
||||
-charset => 'utf-8',
|
||||
|
|
Loading…
Reference in a new issue