Bug 821260

Summary: Expand multi-byte patch incompatibilities
Product: [Fedora] Fedora Reporter: Andrej Antas <cheaterblue>
Component: coreutilsAssignee: Ondrej Vasik <ovasik>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: kdudka, maxamillion, mbriza, ovasik, p, twaugh
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-20 11:47:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch adding multi-byte functionality tests
none
Proposed patch to fix the issue none

Description Andrej Antas 2012-05-13 16:12:27 UTC
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):
coreutils-8.15-8.fc18


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 16:53:02 UTC
Created attachment 584162 [details]
patch adding multi-byte functionality tests

Comment 2 Martin Bříza 2012-07-24 11:08:30 UTC
Created attachment 599986 [details]
Proposed patch to fix the issue

Hello,
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 11:10:35 UTC
Sorry, I meant isblank(), not iswhite().

Comment 4 Ondrej Vasik 2012-08-20 11:47:33 UTC
I think it should be fine - definitely better than before. Closing RAWHIDE.

Comment 5 Fedora Update System 2012-08-20 12:28:13 UTC
coreutils-8.17-5.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/coreutils-8.17-5.fc18

Comment 6 Fedora Update System 2012-09-17 23:22:26 UTC
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.