From 62975967330f8224ef4f3595b9dcd0d37ef79ea0 Mon Sep 17 00:00:00 2001 From: Mark Hofstetter Date: Mon, 19 Oct 2020 17:28:19 +0000 Subject: [PATCH] Bug 26601: Add utf8 encoding to text output of overdue_notices.pl This patch sets the UTF8 encoding for output of overdue_notices.pl when outputting to txt. To test: 1/ Create ODUE text with a utf8 encoded characher, eg german umlauts /cgi-bin/koha/tools/letter.pl?op=add_form&module=circulation&code=ODUE 2/ Run perl overdue_notices.pl -text [-library ] -test 3/ Confirm text now inludes properly encoded umlauts Sponsored-by: Styrian State Library Signed-off-by: Martin Renvoize --- misc/cronjobs/overdue_notices.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl index 01200d8435..591feea145 100755 --- a/misc/cronjobs/overdue_notices.pl +++ b/misc/cronjobs/overdue_notices.pl @@ -439,7 +439,7 @@ elsif ( defined $text_filename ) { $fh = *STDOUT; } else { my $today = dt_from_string(); - open $fh, ">",File::Spec->catdir ($text_filename,"notices-".$today->ymd().".txt"); + open $fh, ">:encoding(UTF-8)",File::Spec->catdir ($text_filename,"notices-".$today->ymd().".txt"); } } -- 2.20.1