Bug 914666 - diff -E fails in multibyte locales
Summary: diff -E fails in multibyte locales
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: diffutils
Version: 18
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 484892
Blocks: 914662
TreeView+ depends on / blocked
 
Reported: 2013-02-22 13:06 UTC by Martin Kyral
Modified: 2013-02-27 02:42 UTC (History)
6 users (show)

Fixed In Version: diffutils-3.2-12.fc18
Clone Of: 484892
Environment:
Last Closed: 2013-02-27 02:42:24 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Comment 1 Martin Kyral 2013-02-22 13:08:19 UTC
sdiff -E doesn't ignore the tab expansion in F18

[mkyral@dhcp bz484892-sdiff-does-not-recognize-E-option]$ rpm -q diffutils
diffutils-3.2-11.fc18.x86_64

[mkyral@dhcp bz484892-sdiff-does-not-recognize-E-option]$ sdiff -E file1 file2
        aaa                                                   |         aaa
        bbb                                                   |         bbb
[mkyral@dhcp bz484892-sdiff-does-not-recognize-E-option]$ echo $?
1

Comment 2 Tim Waugh 2013-02-22 13:47:21 UTC
Works fine with LC_ALL=C, so I guess the i18n patch needs to be fixed.

Comment 3 Fedora Update System 2013-02-22 14:38:51 UTC
diffutils-3.2-12.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/diffutils-3.2-12.fc18

Comment 4 Fedora Update System 2013-02-24 08:33:52 UTC
Package diffutils-3.2-12.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing diffutils-3.2-12.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-2894/diffutils-3.2-12.fc18
then log in and leave karma (feedback).

Comment 5 Vasilis Keramidas 2013-02-25 20:15:06 UTC
I tried  diffutils-3.2-12.fc18 (https://admin.fedoraproject.org/updates/F18/FEDORA-2013-2894)
Doesn't seems to fix the bug

Comment 6 Tim Waugh 2013-02-26 08:54:59 UTC
Really?  It works for me:

[twaugh@rubik ~]$ cat -vet /tmp/file1
        aaa$
        bbb$
[twaugh@rubik ~]$ cat -vet /tmp/file2
^Iaaa$
^Ibbb$

Before update:
[twaugh@rubik ~]$ sdiff -E /tmp/file1 /tmp/file2
        aaa						      |		aaa
        bbb						      |		bbb
[twaugh@rubik ~]$ echo $?
1

After update:
[twaugh@rubik ~]$ sdiff -E /tmp/file1 /tmp/file2
        aaa								aaa
        bbb								bbb
[twaugh@rubik ~]$ echo $?
0

Could you please attach a test case that demonstrates the failure you're seeing?

Comment 7 Vasilis Keramidas 2013-02-26 09:46:28 UTC
[keramidas@keramidaspc ~]$ cat -vet a
aaa$
bbb$
[keramidas@keramidaspc ~]$ cat -vet b
^Iaaa$
^Ibbb$

Before update:
[keramidas@keramidaspc ~]$ diff -E a b
1,2c1,2
< aaa
< bbb
---
> 	aaa
> 	bbb


After update:
[keramidas@keramidaspc ~]$ diff -E a b
1,2c1,2
< aaa
< bbb
---
> 	aaa
> 	bbb

[keramidas@keramidaspc ~]$ echo $?
1

Comment 8 Tim Waugh 2013-02-26 09:52:26 UTC
The -E option is for ignoring changes due to tab expansion, i.e. due to expanding tab characters into the appropriate number of spaces, depending on the --tabsize option (default is 8).

So with -E, a tab character at the beginning of a line is considered no different from 8 spaces at the beginning of a line.  Note: this is more restrictive than --ignore-space-change, which would ignore any change in the amount of white space.  -E is strictly for ignoring tabs being expanded into spaces.

What you have is the introduction of a tab character where there was previously no whitespace.  To ignore that change, you would need --ignore-all-space (-w).

Comment 9 Vasilis Keramidas 2013-02-26 10:06:23 UTC
You are right. I updated my karma review. Sorry for the inconvenience.

Comment 10 Tim Waugh 2013-02-26 10:30:42 UTC
Don't worry at all, thanks very much for testing.

Comment 11 Fedora Update System 2013-02-27 02:42:27 UTC
diffutils-3.2-12.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.