From 418da38327e9456592b4a7fdde8375918b3ca9fb 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) --- 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 a33600d528..443d846473 100755 --- a/misc/cronjobs/patron_emailer.pl +++ b/misc/cronjobs/patron_emailer.pl @@ -96,6 +96,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