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#60750: 29.0.60; encode-coding-char fails for utf-8-auto coding system Date: Thu, 12 Jan 2023 16:04:07 +0200 Message-ID: <83bkn3c0iw.fsf@gnu.org> References: <87zgaof7cg.fsf@gmail.com> <83fscgaq6j.fsf@gnu.org> <871qnzg94y.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38809"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60750@debbugs.gnu.org To: Robert Pluim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 12 16:04:14 2023 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 1pFz7l-0009dQ-Ln for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 12 Jan 2023 16:04:13 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFyCX-0003Ks-O5; Thu, 12 Jan 2023 09:05:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyCU-0003KK-Lr for bug-gnu-emacs@gnu.org; Thu, 12 Jan 2023 09:05:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pFyCU-0006AP-DN for bug-gnu-emacs@gnu.org; Thu, 12 Jan 2023 09:05:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pFyCT-0002Lp-PZ for bug-gnu-emacs@gnu.org; Thu, 12 Jan 2023 09:05: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: Thu, 12 Jan 2023 14:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60750 X-GNU-PR-Package: emacs Original-Received: via spool by 60750-submit@debbugs.gnu.org id=B60750.16735322588972 (code B ref 60750); Thu, 12 Jan 2023 14:05:01 +0000 Original-Received: (at 60750) by debbugs.gnu.org; 12 Jan 2023 14:04:18 +0000 Original-Received: from localhost ([127.0.0.1]:45041 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pFyBl-0002Ke-KW for submit@debbugs.gnu.org; Thu, 12 Jan 2023 09:04:17 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:52782) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pFyBk-0002KS-7h for 60750@debbugs.gnu.org; Thu, 12 Jan 2023 09:04:16 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBe-00065X-NM; Thu, 12 Jan 2023 09:04:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=yoI8MGUtmjGvOGKWTJGt1qyMEl8jTxAG/9p7mAefz9w=; b=XszaWg0Cqhvu8clXShmd SeYrk5QD5+Jupn60ClO+JHiRRuiCFMbqKa65Ic92UERXibEvUSVK/DtKelXdupXgc8dLUNobF8LIi WmR1YPGoN1XQuY2LRnXVvfQX1E7hhn4Pr2nchFfG1bF9FO2p386rJQ2qFWK1BnOF8ewRyG6wA3psa CNfyU4WtTpwE3iuM0svcTJ1up1HS6uJm3HIiSVjtviXI62xnI5M8W4gwyHKtkKwVefQTWrPeigJx5 //UGQGpdse5eXqcz7ADaxVvQ2oXHSfoLv966DpcT09RCBVIiL/LHwyjUcY7/LK3r9ypCsa7/sXMZr TnmExZb8KJ2QMQ==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFyBe-0005Lh-59; Thu, 12 Jan 2023 09:04:10 -0500 In-Reply-To: <871qnzg94y.fsf@gmail.com> (message from Robert Pluim on Thu, 12 Jan 2023 14:44:29 +0100) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:253228 Archived-At: > From: Robert Pluim > Cc: 60750@debbugs.gnu.org > Date: Thu, 12 Jan 2023 14:44:29 +0100 > > One minor nit, the description for ':endian' says: > > `:endian' > > VALUE must be `big' or `little' specifying big-endian and > little-endian respectively. The default value is `big'. > > This attribute is meaningful only when `:coding-type' is `utf-16'. > > That last sentence seems untrue, as ':endian' is meaningful for > 'utf-8-auto' That depends on what you mean by "meaningful". What it wants to say is that it's meaningless to change the value of this property for any coding-system other than UTF-16. > Eli> Who does set utf-8-auto? where did you originally bump into this? > Eli> This is an obscure coding-system, and the fix to make it work as > Eli> documented will produce an incompatible change in behavior. So before > Eli> I decide whether to make the change and on what branch, I'd like to > Eli> know how in the world did you encounter this. > > Itʼs entirely my own fault: > > The file where I noticed this is shared between a GNU/Linux and a > macOS machine, which means I foolishly added the following a year ago, > even though itʼs unnecessary (perhaps I was thinking I was going to be > sharing it with a Windows machine?): > > ;; -*- lexical-binding: t; coding: utf-8-auto; -*- So you thought the "-auto" part was about the EOL format? > I think that means we can leave the code as it is. ??? "As it is" means this coding-system behaves contrary to documentation: it should produce BOM on encoding. Leaving it as is doesn't sound TRT, so I'd like to have this fixed. From your description, it sounds like you bumped into this by mistake, and I see only one other use of it -- in the test suite. So I'm inclined to installing this on the emacs-29 release branch.