Bugzilla – Attachment 112124 Details for
Bug 26601
Add utf8 output to text output of overdue_notices.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26601: Add utf8 encoding to text output of overdue_notices.pl
Bug-26601-Add-utf8-encoding-to-text-output-of-over.patch (text/plain), 1.66 KB, created by
Katrin Fischer
on 2020-10-22 00:58:11 UTC
(
hide
)
Description:
Bug 26601: Add utf8 encoding to text output of overdue_notices.pl
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2020-10-22 00:58:11 UTC
Size:
1.66 KB
patch
obsolete
>From dc3b92c2f33dac32e6a6f14be4cf186a50105fde Mon Sep 17 00:00:00 2001 >From: Mark Hofstetter <mark@hofstetter.at> >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: >0/ Check out an item with due date yesterday (use specify due date) >1/ Create ODUE text with utf8 encoded characters, chinese characters, umlauts etc > <url>/cgi-bin/koha/tools/letter.pl?op=add_form&module=circulation&code=ODUE >2/ Run > perl overdue_notices.pl -text ./ >3/ Verify encoding in the generated text file is incorrect >4/ Apply patch and repeat 2/ >3/ Confirm text now inludes properly encoded characters > >Sponsored-by: Styrian State Library >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >With German umlauts on my system the editor still showed the >characters correctly (probably guessing the right encoding). >Using Chinese made the problem visible. >--- > 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.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 26601
:
112006
|
112112
| 112124