Bug 821260 - Expand multi-byte patch incompatibilities
Expand multi-byte patch incompatibilities
Product: Fedora
Classification: Fedora
Component: coreutils (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Ondrej Vasik
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-05-13 12:12 EDT by Andrej Antas
Modified: 2012-09-17 19:22 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-08-20 07:47:33 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
patch adding multi-byte functionality tests (15.45 KB, patch)
2012-05-13 12:53 EDT, Andrej Antas
no flags Details | Diff
Proposed patch to fix the issue (619 bytes, patch)
2012-07-24 07:08 EDT, Martin Bříza
no flags Details | Diff

  None (edit)
Description Andrej Antas 2012-05-13 12:12:27 EDT
Description of problem:
As multibyte patch contains different paths from upstream and it is hard to
track the changes in behaviour, this bugzilla will be to track found
incompatibilites && fixes in coreutils-i18n patch for expand utility.

Version-Release number of selected component (if applicable):

Steps to Reproduce:
1. Call following commands with LC_ALL=C and LC_ALL=fr_FR.UTF-8 locales

a) echo -n -e " \ta\tb" | expand --tabs=3 -i

Actual results:
Results are different (or command fails)

Expected results:
Results should be same

Additional info:
mistakes found after applying attached patch (it adds multibyte tests for utilities cut, expand, fold, join, pr, sort, unexpand, uniq)
Comment 1 Andrej Antas 2012-05-13 12:53:02 EDT
Created attachment 584162 [details]
patch adding multi-byte functionality tests
Comment 2 Martin Bříza 2012-07-24 07:08:30 EDT
Created attachment 599986 [details]
Proposed patch to fix the issue

I'm attaching a patch that fixes the bug. The problem was, the function ignored when there is a blank (space, etc.) character on the beggining of the line. 
However, I'm not entirely sure if the iswhite() call in the -2 branch of the switch is correct... or if the behavior there is what the program should do when a complete multibyte character was not parsed.
Comment 3 Martin Bříza 2012-07-24 07:10:35 EDT
Sorry, I meant isblank(), not iswhite().
Comment 4 Ondrej Vasik 2012-08-20 07:47:33 EDT
I think it should be fine - definitely better than before. Closing RAWHIDE.
Comment 5 Fedora Update System 2012-08-20 08:28:13 EDT
coreutils-8.17-5.fc18 has been submitted as an update for Fedora 18.
Comment 6 Fedora Update System 2012-09-17 19:22:26 EDT
coreutils-8.17-5.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.