From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Copley Newsgroups: gmane.emacs.bugs Subject: bug#22436: read-coding-system uses wrong default when called from write-file Date: Sat, 23 Jan 2016 09:45:39 +0000 Message-ID: References: <83zivx5mwu.fsf@gnu.org> <83vb6k6dqi.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1453542442 13883 80.91.229.3 (23 Jan 2016 09:47:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 23 Jan 2016 09:47:22 +0000 (UTC) Cc: 22436@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 23 10:47:13 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aMuml-000438-Or for geb-bug-gnu-emacs@m.gmane.org; Sat, 23 Jan 2016 10:47:12 +0100 Original-Received: from localhost ([::1]:56693 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMuml-0005lY-3E for geb-bug-gnu-emacs@m.gmane.org; Sat, 23 Jan 2016 04:47:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39421) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMumh-0005kl-Gy for bug-gnu-emacs@gnu.org; Sat, 23 Jan 2016 04:47:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aMumc-0005GY-MN for bug-gnu-emacs@gnu.org; Sat, 23 Jan 2016 04:47:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41884) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMumc-0005GU-IM for bug-gnu-emacs@gnu.org; Sat, 23 Jan 2016 04:47:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aMumc-0004F4-DN for bug-gnu-emacs@gnu.org; Sat, 23 Jan 2016 04:47:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Richard Copley Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Jan 2016 09:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22436 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22436-submit@debbugs.gnu.org id=B22436.145354237516252 (code B ref 22436); Sat, 23 Jan 2016 09:47:02 +0000 Original-Received: (at 22436) by debbugs.gnu.org; 23 Jan 2016 09:46:15 +0000 Original-Received: from localhost ([127.0.0.1]:58337 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aMulr-0004E4-1j for submit@debbugs.gnu.org; Sat, 23 Jan 2016 04:46:15 -0500 Original-Received: from mail-yk0-f182.google.com ([209.85.160.182]:36796) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aMulq-0004Ds-8B for 22436@debbugs.gnu.org; Sat, 23 Jan 2016 04:46:14 -0500 Original-Received: by mail-yk0-f182.google.com with SMTP id v14so113421625ykd.3 for <22436@debbugs.gnu.org>; Sat, 23 Jan 2016 01:46:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=zdmB/pgPMd+QrfsKUdHqtkTOfjDqpo1N1PAoTJ+LkB8=; b=obvN/ymSGRvXgwLEH72Rvo24KTY0Mc5mVfp2JLapDHKyeMrjHXFGNAz/K8olGR1lM2 BWKR4WFIMhbL7lNuj/fO0PX90H8JB/H6cjZlspLgpCYyJ0JPMAnIeya8cUZKTsUiKPeA TN3uMYXW2QmCi0MaJjes9k79LVBiVQ9J6FMC0cQv+DMmfEVNhQ6GCQ0CWSoaKT3GCqlv RNdt4Eb+7rL7KJ9TLSJPv7s+Y1eeQ2nMUmmLy0KGSO+if75QHLzZ8n6Q3HfZXITb+N6S NzqSWQtpbXV/QlDaWzUPVgjjiMNTOpG0qlFvECzM8B4ZAirKG+XK4FJptj5mzq1q1Wfi h1Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=zdmB/pgPMd+QrfsKUdHqtkTOfjDqpo1N1PAoTJ+LkB8=; b=icLN7D8+5Kc5r8DsRKE1+86ctHmJDT8cFrWvp5VHGzB8zNjUMrs5D4d6ASXBihj6sZ sb5AtgGXptix4E1rM91UFG/pZFGuDk4Gh7s9bWHtiGmeaTIVVx9RAy0sV40m6izt5Ma/ XC5nMySy1vVByBcNbt+7g0iWmgUIxNqodXn+jIa8u8CqAlf4+CEbozo1nEX+M8w3l4zf DVOqm71PFgbDny/u9cfdlBB/Gq1XbjHFOIPFCibRlxuCLDCaR3nvtduNDGA25GXxMFii klLP68zUdtSR9A0Jcx5PqSGD3wYkFPoNrP24/JXGGUyPeqrr8QkKgdAtqYgw6N0Km97m IB1A== X-Gm-Message-State: AG10YOTUFc0ybxdvQZrKJH0PpwNlA/f6REZ8/NB7RkuYr/XhoMTf3FUy9ZRwQQi05UfPzxU3XgenGbRlzGakGw== X-Received: by 10.13.218.198 with SMTP id c189mr4097608ywe.165.1453542368709; Sat, 23 Jan 2016 01:46:08 -0800 (PST) Original-Received: by 10.37.207.214 with HTTP; Sat, 23 Jan 2016 01:45:39 -0800 (PST) In-Reply-To: <83vb6k6dqi.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:111882 Archived-At: On 23 January 2016 at 05:56, Eli Zaretskii wrote: >> From: Richard Copley >> Date: Fri, 22 Jan 2016 23:23:40 +0000 >> Cc: 22436@debbugs.gnu.org >> >> On 22 January 2016 at 21:23, Eli Zaretskii wrote: >> >> From: Richard Copley >> >> Date: Fri, 22 Jan 2016 19:31:07 +0000 >> >> >> >> >From "emacs -Q", enter a =E2=80=98 in the scratch buffer (e.g., by t= yping "C-x >> >> 8 ["). Save or write the buffer. The minibuffer prompts "Select codin= g >> >> system (default chinese-iso-8bit): ". >> > >> > Why do you think that's wrong? >> >> Of course it's wrong. What do you mean? > > Wrong how? in what way? what did you expect to happen instead? Wrong in the ordinary sense of the word, in that it is not right. It is however exactly what I expected. > Your locale's default encoding, cp1252, cannot encode this character, > so Emacs asked you to provide an encoding that can, and offered > chinese-iso-8bit as the default. Yes. > An encoding can be considered "wrong" if it fails to encode a > character. AFAICS, chinese-iso-8bit does succeed in encoding it, so > the above definition of "wrong" doesn't fit. It encodes the character to #xa1 #xae . When I open the file that is decoded as "=C2=A1=C2=AE", without asking any questions. Isn't that what yo= u saw? Are you going to tell me that's right too? > In addition, there should be a *Warning* buffer displayed where you > have a long list of encodings Emacs knows about that can encode this > character; chinese-iso-8bit is just one of them, but the text there > tells you to select any one of them. Do you see that buffer > displayed? Yes, but chinese-iso-8bit is not on the list. > Given all this information, please do tell why you think what Emacs > did was wrong, Do you seriously think it's the right thing to do? That's the last thing I expected. I don't know how to respond. > and what did you think Emacs should have done instead. I think Emacs should pick something less surprising and unhelpful, like utf-8.