Bug 821260 - Expand multi-byte patch incompatibilities
Summary: Expand multi-byte patch incompatibilities
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: coreutils
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ondrej Vasik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-13 16:12 UTC by Andrej Antas
Modified: 2012-09-17 23:22 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-20 11:47:33 UTC
Type: Bug
Embargoed:


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

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.


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