Bug 74884
Summary: | DateManip complains of Malformed UTF-8 | ||||||
---|---|---|---|---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Tom Cross <tomc> | ||||
Component: | perl-DateManip | Assignee: | Jason Vas Dias <jvdias> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | |||||
Severity: | low | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 8.0 | CC: | alex, axel.thimm, davidbh-redhatbeta, mattdm, perl-devel, tao | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | i686 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | perl-5.8.0-90.4 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2006-01-19 22:33:50 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 100644 | ||||||
Attachments: |
|
Description
Tom Cross
2002-10-02 15:36:22 UTC
A one-liner to reproduce this is: % perl -MDate::Manip -e 0 Expected result: no output. Actual result: all those malformed UTF-8 errors. The same error messages are produced when building Date::Manip from CPAN, so it's not that the perl-DateManip package is bad in itself. Must be some interaction between Manip.pm and the way that your perl is built. Setting LANG=C stops the errors, see <http://www.ee.ethz.ch/~slist/mrtg/msg20204.html>. (It's possible that other modules than Date::Manip have the same problem, of course.) It seems to be related to the choice of UTF-8 locales. So en_US.UTF8 causes the error messages, but the locale en_US doesn't. This must be because Manip.pm contains literal high-bit-set characters, and when perl is running in the UTF-8 locale it expects its source code to use UTF- 8 as well. Which may or may not be a good idea, but that's what it does. Suggested fix is to change Manip.pm to use chr(xxx) instead of literal characters. That would stop these warning messages, it wouldn't get Date::Manip to work correctly with UTF-8 input I think, but it's a start. Thanks for the tip. It seems the non-UTF-8 string literals were inside comments, anyway. So as a fix, I just iconv'd the file to UTF-8 and no more errors/warnings. Blissfully quiet A fixed source RPM for Date::Manip is at <http://atrpms.physik.fu-berlin.de/dist/rh9/perl-DateManip/>. For cross-reference: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=105866#c2 *** Bug 88017 has been marked as a duplicate of this bug. *** Created attachment 99440 [details]
Script to find Perl Modules that iconv dislikes
This script will give a listing of Perl Modules that iconv doesn't like.
This might be useful for fixing other modules.
I'll create another bug if people think this is useful.
Is "non-UTF-8 string literals were inside comments" still fatal in modern perl, and if so would something like the above script be useful in an automated test to avoid this problem in our future perl packages? This is definitely no longer a bug with all current perl versions in all Red Hat linux releases, including the perl-5.8.0+ in RHEL-3 . o perl no longer complains about invalid UTF8 in comments o The Date::Manip module no longer contains invalid UTF-8 This bug can now be closed. |