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.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Bruno Haible <bruno <at> clisp.org>
Subject: bug#64461: closed (Re: [bug-diffutils] bug#64461: strange output
 of "diff -l -y")
Date: Tue, 04 Jul 2023 17:48:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#64461: strange output of "diff -l -y"

which was filed against the diffutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 64461 <at> debbugs.gnu.org.

-- 
64461: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=64461
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
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 3 (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)]
[Message part 5 (message/rfc822, inline)]
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 6 (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)]

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.