From 7d378ac3fb0c2cffaa5c09ba6cd57eb83787c637 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=UTF-8 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 --- 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.30.2