Red Hat Bugzilla – Bug 821260
Expand multi-byte patch incompatibilities
Last modified: 2012-09-17 19:22:26 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
Results are different (or command fails)
Results should be same
mistakes found after applying attached patch (it adds multibyte tests for utilities cut, expand, fold, join, pr, sort, unexpand, uniq)
Created attachment 584162 [details]
patch adding multi-byte functionality tests
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.
Sorry, I meant isblank(), not iswhite().
I think it should be fine - definitely better than before. Closing RAWHIDE.
coreutils-8.17-5.fc18 has been submitted as an update for Fedora 18.
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.