Bug 18227 - Koha::Logger utf8 handling defeating "wide characters in print"
Summary: Koha::Logger utf8 handling defeating "wide characters in print"
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Olli-Antti Kivilahti
QA Contact: Kyle M Hall (khall)
URL:
Keywords:
Depends on: 24905
Blocks: 15253
  Show dependency treegraph
 
Reported: 2017-03-08 10:49 UTC by Olli-Antti Kivilahti
Modified: 2020-11-30 21:46 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.05.00,19.11.06
Circulation function:


Attachments
Bug 18227 - Koha::Logger utf8 handling defeating "wide characters in print" (2.45 KB, patch)
2017-03-08 10:52 UTC, Olli-Antti Kivilahti
Details | Diff | Splinter Review
Bug 18227: Handle utf8 in Koha::Logger (2.88 KB, patch)
2020-04-01 03:19 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 18227: (QA follow-up) Add fix to koha-common.postinst (1020 bytes, patch)
2020-04-01 03:20 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 18227: Handle utf8 in Koha::Logger (2.95 KB, patch)
2020-04-01 12:53 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 18227: (QA follow-up) Add fix to koha-common.postinst (1.07 KB, patch)
2020-04-01 12:54 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Olli-Antti Kivilahti 2017-03-08 10:49:53 UTC
One must explicitly tell the Log4perl-appenders to deal with utf8.
Poor Log4perl.
Poor utf8 in Perl.

this patch adds utf8=1 to log4perl.conf
Comment 1 Olli-Antti Kivilahti 2017-03-08 10:52:28 UTC
Created attachment 60912 [details] [review]
Bug 18227 - Koha::Logger utf8 handling defeating "wide characters in print"

No more wide characters in print when logging to a file with Koha::Logger.

Test with this string

"♯Turpo :"
Comment 2 Katrin Fischer 2017-10-15 11:49:53 UTC
Patch no longer applies (missing dependency?):

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 18227 - Koha::Logger utf8 handling defeating "wide characters in print"
fatal: sha1 information is lacking or useless (etc/log4perl.conf).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001 Bug 18227 - Koha::Logger utf8 handling defeating "wide characters in print"
The copy of the patch that failed is found in:
   /home/vagrant/kohaclone/.git/rebase-apply/patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in /tmp/Bug-18227---KohaLogger-utf8-handling-defeating-wid-VJmYgV.patch
Comment 3 Katrin Fischer 2017-10-15 11:51:33 UTC
Assigning to Olli-Antti as he provided the patch.
Comment 4 Tomás Cohen Arazi (tcohen) 2020-04-01 03:19:59 UTC
Created attachment 102167 [details] [review]
Bug 18227: Handle utf8 in Koha::Logger

No more wide characters in print when logging to a file with Koha::Logger.

Test with this string

"♯Turpo :"

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 5 Tomás Cohen Arazi (tcohen) 2020-04-01 03:20:05 UTC
Created attachment 102168 [details] [review]
Bug 18227: (QA follow-up) Add fix to koha-common.postinst

Now koha-common.postinst has a way to patch log4perl configs on
instances, we should patch the Z3950 responder config accordingly,
before it is backported to 19.11 or the 20.05 release :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 6 Tomás Cohen Arazi (tcohen) 2020-04-01 03:23:09 UTC
I changed the dependency the other way so this has the chance to get pushed faster. This is important as my follow-up is patching something that hasn't hit stable yet (koha-common.postinst) and if the 19.11 rmaint is willing to backport bug 24905, this needs to be fixed for backporting, otherwise patching production Koha will be really tricky.
Comment 7 Kyle M Hall (khall) 2020-04-01 12:53:55 UTC
Created attachment 102223 [details] [review]
Bug 18227: Handle utf8 in Koha::Logger

No more wide characters in print when logging to a file with Koha::Logger.

Test with this string

"♯Turpo :"

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 8 Kyle M Hall (khall) 2020-04-01 12:54:05 UTC
Created attachment 102224 [details] [review]
Bug 18227: (QA follow-up) Add fix to koha-common.postinst

Now koha-common.postinst has a way to patch log4perl configs on
instances, we should patch the Z3950 responder config accordingly,
before it is backported to 19.11 or the 20.05 release :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 9 Martin Renvoize (ashimema) 2020-04-06 11:22:32 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 10 Joy Nelson 2020-04-29 20:48:06 UTC
Backported to 19.11.x for 19.11.06
Comment 11 Lucas Gass (lukeg) 2020-05-11 21:15:44 UTC
missing dependencies for 19.05.x, no backport