Bug 24163: UTF-8 encode the output

Specify the UTF-8 charset in the header and Encode the output to avoid encoding issues

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Jonathan Druart 2020-05-02 15:57:16 +02:00 committed by Martin Renvoize
parent 2042cb6531
commit a02f0b0777
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 3 additions and 1 deletions

View File

@ -17,6 +17,7 @@
use Modern::Perl;
use CGI qw ( -utf8 );
use Encode;
use C4::Auth;
use C4::Acquisition;
@ -87,7 +88,8 @@ unless ( $csv_profile_id ) {
print $input->header(
-type => 'text/csv',
-attachment => 'lateorders.csv',
-charset => 'UTF-8',
);
print $csv;
print Encode::encode_utf8($csv);
exit;
}