From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003 Description of problem: I realize this is a duplicate of bug #83652, but bugzilla isn't letting me post additional comments to that bug report. I have a problem with autorpm-3.1-1.noarch.rpm (from autorpm.org) failing on Red Hat 9, which I tracked down to a problem with Perl's regex handling with UTF-8 locales. I also tried the smaller test case, echo abc | perl -ne 'use locale;print if /[^\s]+/' under Red Hat 8.0 (perl-5.8.0-55) and Red Hat 9 (perl-5.8.0-88) and it works fine on Red Hat 8.0 with LANG=en_US.UTF-8, but under RH 9 it fails with that LANG (but works with LANG=C or LANG=en_US). Given that it's the same version of perl on both systems, the problem must lie somewhere in the utf-8 related patches in the 88 release. The suggested workaround, exec 'env', 'LANG=C', $0, @ARGV unless $ENV{"LANG"} eq "C"; works well for autorpm too. Still, given that Perl scripts rely so heavily on regular expressions, it would be kind of nice if they actually worked with the UTF-8 locales (which Red Hat 8.0 & 9 use by default). Having to kludge all Perl scripts like this would get really ugly, not to mention it would break scripts where you want the LANG setting preserved. Version-Release number of selected component (if applicable): perl-5.8.0-88 How reproducible: Always Steps to Reproduce: 1. export LANG=en_US.UTF-8 2. echo abc | perl -ne 'use locale;print if /[^\s]+/' Actual Results: no output Expected Results: abc Additional info:
Sorry, I meant bug #82652. *** This bug has been marked as a duplicate of 82652 ***
I may have spoken too soon. The suggested workaround, exec 'env', 'LANG=C', $0, @ARGV unless $ENV{"LANG"} eq "C"; works as long as LANG is set. If you put it in a script that may be run from cron, like autorpm is, or anywhere else where LANG is not set, then you'll get an error instead. E.g.: Use of uninitialized value in string eq at /usr/sbin/autorpm line 25.
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.