GNU bug report logs - #25343
diffutils run with option -B do not ignore blank lines with Windows line ending

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: diffutils; Reported by: Jeff THUONG <jfthuong@HIDDEN>; dated Tue, 3 Jan 2017 05:20:01 UTC; Maintainer for diffutils is bug-diffutils@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 3 Jan 2017 05:19:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 03 00:19:14 2017
Received: from localhost ([127.0.0.1]:39938 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1cOHVC-0000U8-3r
	for submit <at> debbugs.gnu.org; Tue, 03 Jan 2017 00:19:14 -0500
Received: from eggs.gnu.org ([208.118.235.92]:45631)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jfthuong@HIDDEN>) id 1cOG8o-00058W-QQ
 for submit <at> debbugs.gnu.org; Mon, 02 Jan 2017 22:52:03 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <jfthuong@HIDDEN>) id 1cOG8i-0002iu-KR
 for submit <at> debbugs.gnu.org; Mon, 02 Jan 2017 22:51:57 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:52815)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <jfthuong@HIDDEN>) id 1cOG8i-0002iq-HK
 for submit <at> debbugs.gnu.org; Mon, 02 Jan 2017 22:51:56 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:36593)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <jfthuong@HIDDEN>) id 1cOG8h-0007Fs-4h
 for bug-diffutils@HIDDEN; Mon, 02 Jan 2017 22:51:56 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <jfthuong@HIDDEN>) id 1cOG8g-0002iT-C4
 for bug-diffutils@HIDDEN; Mon, 02 Jan 2017 22:51:55 -0500
Received: from mail-vk0-x230.google.com ([2607:f8b0:400c:c05::230]:34118)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <jfthuong@HIDDEN>) id 1cOG8g-0002iF-5u
 for bug-diffutils@HIDDEN; Mon, 02 Jan 2017 22:51:54 -0500
Received: by mail-vk0-x230.google.com with SMTP id x186so269767840vkd.1
 for <bug-diffutils@HIDDEN>; Mon, 02 Jan 2017 19:51:52 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:from:date:message-id:subject:to;
 bh=yc7oxN1y9eJMoA06GBynvhZJXCj3cUB6Pf5xXATWhi4=;
 b=M/RTVL+Zm+rOyfvHnAhQgktxX8H9md+7698SJyIFFpehqPlCgvgm5Mn83MCC/2W/p6
 vuoUnCb2vcwpmuzYnjo1Pe3Px2eLJ3EUuUYf1JI8Jj5VkoFU1Ffxwz+dslNoQjaszx2D
 ljg6dFpc/bI0jwXGE9RGxV6SDbAfhy0GIpYEgq6lL3CtqDsTk2I0m3+FKo59AvEpekZr
 b346bZFyFQ+ee3IBiD+GmIGV4/4thNynY2xxecRUJ+E9u5f5TfFOTNFeV/18VlBSWenV
 ZoaaJvjpqZD8n4gGWbTgOeVYb8tBp2h7jGjNAaeq0YfDFcNh3hWQ0RgcuwilfcsIM4Zs
 vXog==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=yc7oxN1y9eJMoA06GBynvhZJXCj3cUB6Pf5xXATWhi4=;
 b=D/ZcAgQlYP74JjikVu29nfzD1czK9iXvJunic7DuYyCp3q+2xquuuKBT1qLB7F8Kjs
 T+h22M4Cs3DIIG7obBPHJq8mmX9Xe/Zaq36sh8tIHa8uIKuYsOSgfVLxU9qU52Z9w6PJ
 lHvvVqz46D2nVZuk4Z/DfRmCCiZrY561h01mBbE3oh4OjHCyUNM883NyurOzGa4IrZxe
 45XOYtETIpbuNBvilysgHTw0h/GB9o19LQJLu5xHinkSO0AO3wh3NBtq3f+m8jH9rni+
 ykgPkKMFDokkxnju4drkzjvjIwV7bw+BbS6rcW3B/dUbcjokQSsvU9P6wAejXDlayusp
 n/TQ==
X-Gm-Message-State: AIkVDXIKgfHhTs0wYpal9ym0Fu6wthyhjTORCLQETvHL6kqkpkyJbtWgYUo5tnjtfRJGW6eEh24Zvi/MmpO9AQ==
X-Received: by 10.31.108.22 with SMTP id h22mr17357039vkc.44.1483415511770;
 Mon, 02 Jan 2017 19:51:51 -0800 (PST)
MIME-Version: 1.0
Received: by 10.176.70.25 with HTTP; Mon, 2 Jan 2017 19:51:31 -0800 (PST)
From: Jeff THUONG <jfthuong@HIDDEN>
Date: Tue, 3 Jan 2017 11:51:31 +0800
Message-ID: <CAFSBtErd5bF-AihGHPcYGVPA1PyPkq3XsaYOs6iP51j-sZmVTA@HIDDEN>
Subject: diffutils run with option -B do not ignore blank lines with Windows
 line ending
To: bug-diffutils@HIDDEN
Content-Type: multipart/alternative; boundary=001a11478df8a22ab00545289620
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Tue, 03 Jan 2017 00:19:12 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

--001a11478df8a22ab00545289620
Content-Type: text/plain; charset=UTF-8

Hi,

When comparing 2 files with Windows line ending (i.e. '\r\n'), the option
-B does not ignore blank lines.

I have the following files
--file1.txt--
Line 1<eol>
<eol>
Line 2<eof>

--file2.txt--
Line 1<eol>
Line 2<eof>

with <eol> being EOL character and <eof> being the end of file.

When <eol> is Windows ending, the result of "diff -B file1.txt file2.txt" is
*2d1*
*< *

When <eol> is Unix ending, the result is correct and no difference is
returned.


The problem occurred on
* Diff 3.3 on Ubuntu 14.04 LTS
* Diff 2.8.7 on Windows 10 64bits, ported by GnuWin32
* Diff 2.8.7 on Windows XP, Win 7 SP1 x64, Win 8.1 x64, and Win 10 x64 with
source code from GnuWin32 compiled on Cygwin


Is it a bug?


Thanks

--001a11478df8a22ab00545289620
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hi,<div><br></div><div>When comparing 2 files with Windows=
 line ending (i.e. &#39;\r\n&#39;), the option -B does not ignore blank lin=
es.</div><div><br></div><div>I have the following files</div><div>--file1.t=
xt--</div><div>Line 1&lt;eol&gt;</div><div>&lt;eol&gt;</div><div>Line 2&lt;=
eof&gt;</div><div><br></div><div><div>--file2.txt--</div><div>Line 1&lt;eol=
&gt;</div><div>Line 2&lt;eof&gt;</div><div><br></div></div><div>with &lt;eo=
l&gt; being EOL character and &lt;eof&gt; being the end of file.</div><div>=
<br></div><div>When &lt;eol&gt; is Windows ending, the result of &quot;diff=
 -B file1.txt file2.txt&quot; is</div><div><b>2d1</b></div><div><b>&lt;=C2=
=A0</b></div><div><br></div><div>When &lt;eol&gt; is Unix ending, the resul=
t is correct and no difference is returned.</div><div><br></div><div><br></=
div><div>The problem occurred on</div><div>* Diff 3.3 on Ubuntu 14.04 LTS</=
div><div>* Diff 2.8.7 on Windows 10 64bits, ported by GnuWin32</div><div>* =
Diff 2.8.7 on Windows XP, Win 7 SP1 x64, Win 8.1 x64, and Win 10 x64 with s=
ource code from GnuWin32 compiled on Cygwin</div><div><br></div><div><br></=
div><div>Is it a bug?</div><div><br></div><div><br></div><div>Thanks</div><=
div><br></div><div><br></div><div><br></div></div>

--001a11478df8a22ab00545289620--




Acknowledgement sent to Jeff THUONG <jfthuong@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-diffutils@HIDDEN. Full text available.
Report forwarded to bug-diffutils@HIDDEN:
bug#25343; Package diffutils. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

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