Control: tags -1 patch

There has been a discussion about this in debian-policy bug number
865713 (which I wrote).  You will see a copied email in that bug
report from earlier today that I wrote to the GNU less maintainer.

I later sent the GNU maintainer a patch.  It changes two lines in the
file "charset.c" so that the Unicode Byte Order Mark (BOM) is not
printed.  At the same time, less will still correctly echo an input
file in its entirety (with the BOM) if its output is not a terminal
device (that is, if redirected for file output).

I tested the patch with less version 487, which is the latest version
on the GNU FTP server.  It is a later version than what is in Debian.
The modification time on the original "charset.c" file in version 487
is 25 October 2016.

I will update this bug report if the upstream maintainer replies to my
earlier emails.

Thanks,


Paul Hardy
--- charset.c   2016-10-25 07:37:35.000000000 -0700
+++ charset-new.c       2017-06-25 08:28:19.000000000 -0700
@@ -469,7 +469,8 @@
                        SNPRINTF1(buf, sizeof(buf), binfmt, (char) ch);
        } else if (is_ubin_char(ch))
        {
-               SNPRINTF1(buf, sizeof(buf), utfbinfmt, ch);
+               if (ch != 0xFEFF)
+                       SNPRINTF1(buf, sizeof(buf), utfbinfmt, ch);
        } else
        {
                char *p = buf;

Reply via email to