From 447ef4a3935f818aad2c425309b97db55c73ed37 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Tue, 2 Aug 2022 09:24:57 -0300 Subject: [PATCH] Bug 31282: Fix broken characters in patron_emailer.pl verbose mode MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit To test: 1. Have a report containing: SELECT tomascohen@theke.io; 2. Have a members notice containing ¡ and other non-ASCII characters. 3. Run (changing the report number and notice code accordingly): $ kshell k$ perl misc/cronjobs/patron_emailer.pl --report 4 \ --notice BIRTHDAY --from tomascohen@theke.io --module members => FAIL: non-ASCII characters are broken 4. Apply this patch 5. Repeat 3 => SUCCESS: Things print correctly! 6. Sign off :-D Signed-off-by: Tomas Cohen Arazi Signed-off-by: David Nind Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 9afbe872b7e63ce1d88cf6896df3b1046529212b) (cherry picked from commit 418da38327e9456592b4a7fdde8375918b3ca9fb) Signed-off-by: Arthur Suzuki --- misc/cronjobs/patron_emailer.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/misc/cronjobs/patron_emailer.pl b/misc/cronjobs/patron_emailer.pl index a265b762a9..4c1263d308 100755 --- a/misc/cronjobs/patron_emailer.pl +++ b/misc/cronjobs/patron_emailer.pl @@ -103,6 +103,8 @@ Send emails, if omitted script will report as verbose. =cut +binmode( STDOUT, ":encoding(UTF-8)" ); + my $help = 0; my $report_id; my $notice; -- 2.39.5