bug-diffutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-diffutils] bug#64461: strange output of "diff -l -y"


From: Bruno Haible
Subject: [bug-diffutils] bug#64461: strange output of "diff -l -y"
Date: Tue, 04 Jul 2023 18:47:04 +0200

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).

Attachment: 0001-diff-Fix-output-of-diff-l-y-for-non-ASCII-input-file.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]