From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#44486: 27.1; C-@ chars corrupt elisp buffer Date: Sat, 14 Nov 2020 17:09:20 +0200 Message-ID: <83h7psug9r.fsf@gnu.org> References: <878sbeikpr.fsf@posteo.net> <87zh3u8pqn.fsf@igel.home> <83blga8pdp.fsf@gnu.org> <838sbe8nny.fsf@gnu.org> <83361m8d1t.fsf@gnu.org> <87blg6lem7.fsf@gnus.org> <83r1p24ieo.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6964"; mail-complaints-to="usenet@ciao.gmane.io" Cc: thievol@posteo.net, larsi@gnus.org, schwab@linux-m68k.org, 44486@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 14 16:10:29 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kdxC9-0001iN-Tm for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 14 Nov 2020 16:10:29 +0100 Original-Received: from localhost ([::1]:43070 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kdxC8-0006Bp-F2 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 14 Nov 2020 10:10:28 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47852) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdxBi-0006BU-B5 for bug-gnu-emacs@gnu.org; Sat, 14 Nov 2020 10:10:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39946) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kdxBi-0004bm-29 for bug-gnu-emacs@gnu.org; Sat, 14 Nov 2020 10:10:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kdxBh-00016d-TU for bug-gnu-emacs@gnu.org; Sat, 14 Nov 2020 10:10:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 14 Nov 2020 15:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44486 X-GNU-PR-Package: emacs Original-Received: via spool by 44486-submit@debbugs.gnu.org id=B44486.16053665864224 (code B ref 44486); Sat, 14 Nov 2020 15:10:01 +0000 Original-Received: (at 44486) by debbugs.gnu.org; 14 Nov 2020 15:09:46 +0000 Original-Received: from localhost ([127.0.0.1]:51492 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdxBO-000161-5y for submit@debbugs.gnu.org; Sat, 14 Nov 2020 10:09:46 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:47720) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdxBM-00015p-KC for 44486@debbugs.gnu.org; Sat, 14 Nov 2020 10:09:41 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:55822) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kdxBG-0004Vo-GJ; Sat, 14 Nov 2020 10:09:34 -0500 Original-Received: from [176.228.60.248] (port=4670 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kdxBE-00047t-QX; Sat, 14 Nov 2020 10:09:33 -0500 In-Reply-To: (message from Stefan Monnier on Sat, 14 Nov 2020 09:02:16 -0500) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:193284 Archived-At: > From: Stefan Monnier > Cc: Lars Ingebrigtsen , thievol@posteo.net, handa@gnu.org, > schwab@linux-m68k.org, 44486@debbugs.gnu.org > Date: Sat, 14 Nov 2020 09:02:16 -0500 > > > 0 is different: it says to obey the value of > > inhibit-null-byte-detection resp. inhibit-iso-escape-detection. t > > means inhibit the detection unconditionally, which is not what we > > want. > > Actually, for prefer-utf-8 files, I think we never want to automatically > fallback to binary. I think you are assuming prefer-utf-8 is something other than what it is. It is not a variant of UTF-8, it is a variant of 'undecided' (i.e. it starts by detecting the encoding), which prefers UTF-8 if that can decode the text. inhibit-null-byte-detection etc. are relevant to the detection phase, not to the decoding phase. It is wrong IMO to decide to use UTF-8 for a binary byte stream just because it includes valid UTF-8 byte sequences. If the input text is known to be UTF-8, even though it includes null bytes, the user or the application should either bind coding-system-for-read or inhibit-null-byte-detection. > IOW I think Thierry's situation shows a bug in Emacs rather than > a pilot error. I disagree.