Description of problem: When used with UTF-8 characters, the Text::Tabs's expand fails to expand correctly. Version-Release number of selected component (if applicable): $ rpm -qf /usr/lib/perl5/5.8.8/Text/Tabs.pm perl-5.8.8-10 $ grep VERSION /usr/lib/perl5/5.8.8/Text/Tabs.pm use vars qw($VERSION $tabstop $debug); $VERSION = 2005.0824; How reproducible: On a command line. Steps to Reproduce: 1. perl -CS -MText::Tabs -e 'print expand("\taa\t.\n\t\x{010a}\x{010a}\t."), "\n"' 2. perl -CS -MText::Tabs -e 'print expand("\taa\t.\n\t\x{010a}\x{010a}\t."), "\n"' | od -t x1 Actual results: aa . ĊĊ . 0000000 20 20 20 20 20 20 20 20 61 61 20 20 20 20 20 20 0000020 2e 0a 20 20 20 20 20 20 20 20 c4 8a c4 8a 20 20 0000040 20 20 20 20 20 2e 0a 0000047 Bugzilla might mess the formattin, that's why I'm showing the od output as well. Note that after those two (UTF-8) characters, there should really be six spaces, not seven. Expected results: aa . ĊĊ . 0000000 20 20 20 20 20 20 20 20 61 61 20 20 20 20 20 20 0000020 2e 0a 20 20 20 20 20 20 20 20 c4 8a c4 8a 20 20 0000040 20 20 20 20 2e 0a 0000046 Additional info: On RHEL 4 (U4)'s $ rpm -qf /usr/lib/perl5/5.8.5/Text/Tabs.pm perl-5.8.5-36.RHEL4 $ grep VERSION /usr/lib/perl5/5.8.5/Text/Tabs.pm use vars qw($VERSION $tabstop $debug); $VERSION = 98.112801; the result was correct so this looks like regression in RHEL 5. Yenya Kasprzak found the bug: http://www.fi.muni.cz/~kas/blog/index.cgi/computers/cpan-bugs.html
As the bug is present in RHEL 5 as well, I'm changing the Product to reflect that.
This bugzilla has Keywords: Regression. Since no regressions are allowed between releases, it is also being proposed as a blocker for this release. Please resolve ASAP.
This is now here: http://rt.perl.org/rt3/Public/Bug/Display.html?id=42167 There is another implementation of Text::Tabs::expand in the Tabs.pm source file that is not in use - this implementation doesn't have the problem described here, but I'm hesitant to switch to that one until we hear more from upstream - it may have other bugs. The underlying issue seems to be that the pos() function seems to count incorrectly with UTF8 characters.
Hmmm. Per comment #4, perl was an approved component for RHEL 5.1. Yet for some reason, the bug was moved to RHEL 5.2 in comment #5. Alas, perl is not an approved component for RHEL 5.2 as per comment #6. What is the suggested course of action? Moving to RHEL 5.3?
(In reply to comment #8) > This bugzilla has Keywords: Regression. > > Since no regressions are allowed between releases, > it is also being proposed as a blocker for this release. Soooo. Doesn't this also make this a blocker (and perl approved component) for 5.2?
Sooo because upstream is still quiet about it, I'll use previous version of unexpand. It's maybe slower, but functional.
The final fix use change of pos from bleadperl. http://rt.perl.org/rt3/Ticket/Display.html?id=57040
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2009-0117.html