From 51ffdfee329c3c67177834180055daff0a0e87fb Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 2 Oct 2020 15:22:33 +0200 Subject: [PATCH] Bug 22343: Fix runreport encoding issues --- misc/cronjobs/runreport.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misc/cronjobs/runreport.pl b/misc/cronjobs/runreport.pl index 478c96fafb..3e81e08a97 100755 --- a/misc/cronjobs/runreport.pl +++ b/misc/cronjobs/runreport.pl @@ -308,6 +308,7 @@ foreach my $report_id (@ARGV) { $message .= $csv->string() . "\n"; push @rows_to_store, [@$line] if $store_results; } + $message = Encode::decode_utf8($message); } if ( $store_results ) { my $json = to_json( \@rows_to_store ); @@ -332,7 +333,7 @@ foreach my $report_id (@ARGV) { } $email->attach( - encode( 'utf8', $message ), + Encode::encode_utf8($message), content_type => "text/$format", name => "report$report_id-$date.$format", disposition => 'attachment', -- 2.20.1