GNU bug report logs - #64461
strange output of "diff -l -y"

Previous Next

Package: diffutils;

Reported by: Bruno Haible <bruno <at> clisp.org>

Date: Tue, 4 Jul 2023 16:48:01 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 64461 in the body.
You can then email your comments to 64461 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-diffutils <at> gnu.org:
bug#64461; Package diffutils. (Tue, 04 Jul 2023 16:48:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bruno Haible <bruno <at> clisp.org>:
New bug report received and forwarded. Copy sent to bug-diffutils <at> gnu.org. (Tue, 04 Jul 2023 16:48:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Bruno Haible <bruno <at> clisp.org>
To: bug-diffutils <at> gnu.org
Subject: strange output of "diff -l -y"
Date: Tue, 04 Jul 2023 18:47:04 +0200
[Message part 1 (text/plain, inline)]
Hi,

Seen with diffutils 'master' branch today:

$ cat foo1.txt
你好
$ cat foo2.txt
早晨, 你好
$ src/diff -y foo1.txt foo2.txt
你好                                                          | 早晨, 你好
$ src/diff -l -y foo1.txt foo2.txt


2023-07-04 18:41           diff -l -y foo1.txt foo2.txt           Page 1


                                                              | , 




























































你好早晨你好

(and the last line is not terminated by a newline).

This is strange, isn't it? 'diff' has separate the ASCII from the
non-ASCII parts of the input. With the attached patch, the output becomes:

$ src/diff -l -y foo1.txt foo2.txt


2023-07-04 18:42           diff -l -y foo1.txt foo2.txt           Page 1


你好                                                          | 早晨, 你好





























































(which is more what I had expected).

[0001-diff-Fix-output-of-diff-l-y-for-non-ASCII-input-file.patch (text/x-patch, attachment)]

Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Tue, 04 Jul 2023 17:48:02 GMT) Full text and rfc822 format available.

Notification sent to Bruno Haible <bruno <at> clisp.org>:
bug acknowledged by developer. (Tue, 04 Jul 2023 17:48:02 GMT) Full text and rfc822 format available.

Message #10 received at 64461-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Bruno Haible <bruno <at> clisp.org>
Cc: 64461-done <at> debbugs.gnu.org
Subject: Re: [bug-diffutils] bug#64461: strange output of "diff -l -y"
Date: Tue, 4 Jul 2023 10:47:35 -0700
[Message part 1 (text/plain, inline)]
Thanks, I installed that, followed by the attached NEWS update. Luckily 
nobody uses diff -ly.
[0001-doc-mention-bug-64461-in-NEWS.patch (text/x-patch, attachment)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 02 Aug 2023 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 38 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.