Bug 11156 - check-url.pl is not utf friendly
Summary: check-url.pl is not utf friendly
Status: CLOSED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Srdjan Jankovic
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-29 04:12 UTC by Srdjan Jankovic
Modified: 2015-12-03 22:00 UTC (History)
2 users (show)

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


Attachments
bug_11156: binmode STDOUT, ':utf8' (751 bytes, patch)
2013-11-01 04:25 UTC, Srdjan Jankovic
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Srdjan Jankovic 2013-10-29 04:12:23 UTC
Wide character in print at /usr/share/koha/bin/cronjobs/check-url.pl line 215

The easiest way to quiet this warning is simply to add the :utf8 layer to the output, e.g. binmode STDOUT, ':utf8'.
Comment 1 Srdjan Jankovic 2013-11-01 04:25:46 UTC
Created attachment 22661 [details] [review]
bug_11156: binmode STDOUT, ':utf8'

This is a noop.

To test:
* Run misc/cronjobs/check-url.pl

If you *really* want to test, place some non-ascii bogus urls in 856
and observe absence of "wide character" warning
Comment 2 Frédéric Demians 2013-11-01 09:34:18 UTC
I can't reproduce this bug. I've tried with an URL containing ééé.
Comment 3 Srdjan Jankovic 2013-11-03 23:12:55 UTC
Then maybe it was not utf chars, maybe it was some Microsoft 1251. I'll try to find what exactly triggered it.
Comment 5 Frédéric Demians 2013-11-04 06:08:23 UTC
> This is what I had:
> http://www.minedu.govt.nz/educationSectors/M�oriEducation/
> AboutM�oriEducation/WhoWeAre/EngagementWithM�ori/HuiTaumataMatauranga/
> BetterRelationshipsForBetterLearning.aspx

Could you copy-paste here the original URL, as it is in your 856 field?
Comment 6 Owen Leonard 2014-03-11 16:07:37 UTC
Where does the error appear? Does it interrupt the check-url process? I tried adding non-ascii characters to some URLs and didn't get the error quoted above.
Comment 7 Srdjan Jankovic 2014-03-12 01:44:15 UTC
Funny, I cannot reproduce it any more. Could be a paste on MS comp that introduced a funny character.
It does not stop the process, just gives an annoying warning which is not nice in a cron job.

I think that the change is harmless and maybe warranted, it works as expected with the change, but up to you to take it or not.

If I find an example I'll add it here.
Comment 8 Jonathan Druart 2015-02-20 09:42:40 UTC
I think we can consider this as invalid.
Please reopen if needed.