From c4ebc20aa9c5bcdec0f037ccdc94deb5bb651d66 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 Signed-off-by: Jonathan Druart --- 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.39.5