From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: package.el encoding problem Date: Sat, 25 May 2019 10:55:36 -0400 Message-ID: References: <87blztw65c.fsf@wavexx.thregr.org> <83k1ef3ugs.fsf@gnu.org> <83ef4m4pet.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="98084"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat May 25 17:04:21 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hUYDb-000PLo-MG for ged-emacs-devel@m.gmane.org; Sat, 25 May 2019 17:04:20 +0200 Original-Received: from localhost ([127.0.0.1]:43027 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hUYDa-0001Fp-Lh for ged-emacs-devel@m.gmane.org; Sat, 25 May 2019 11:04:18 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:59438) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hUYCV-0001B0-FD for emacs-devel@gnu.org; Sat, 25 May 2019 11:03:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hUY5O-0002GS-H5 for emacs-devel@gnu.org; Sat, 25 May 2019 10:55:51 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:35797) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hUY5L-00026P-4R; Sat, 25 May 2019 10:55:47 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id C4619442B1C; Sat, 25 May 2019 10:55:41 -0400 (EDT) Original-Received: from mail02.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id B0D47442B05; Sat, 25 May 2019 10:55:40 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1558796140; bh=XK1uFo8f8wnm+/wZzP60cmZrwN+0K1aS/lWmHjro+P4=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=fvIUs4meSHyILileGlaReyyZicgspREpz6age8pdLZ5B6FWg8PDQBKeLerh5aDzI4 A4rGt0EL/htHImtOBujwcVWqsPJQSP9SeF8juUrIVWSEASr2/yriDeVc61zyZFZeZe sGkt0pS2XshFDZrZouFCXPIe0j0j4Rb/57m0jQ74cggIzaZPhDPJ/DCBrqUSOw1rk/ 2DoLt+lcOS8Hpir5mmYU7HbmelR3ugXnhZHm1s7P1rUEUQanf+4MJGsTAzue2uqgW+ 64ttecP18Ds/AkJNcJUjIpJ2Ks+OqPz3uTRUM7LwZ+xQ+DAuH21csL3VbHtdSnULQq +BfbGJQf7W+pg== Original-Received: from pastel (unknown [167.88.27.42]) by mail02.iro.umontreal.ca (Postfix) with ESMTPSA id D862C1203A9; Sat, 25 May 2019 10:55:39 -0400 (EDT) In-Reply-To: <83ef4m4pet.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 25 May 2019 16:47:06 +0300") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 132.204.25.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:236980 Archived-At: >> We used to put it into a multibyte buffer, which then causes the save >> the be all confused because the bytes 128-255 it contains aren't part of >> any coding-system. > > I don't see how that matters. Raw bytes should be converted back to > their original unibyte form when saving, no matter what coding-system > is used. The bytes were saved correctly. But before that happened, the user was prompted to choose a coding-system. >> It is definitely *possible* to use multibyte buffers even in cases where >> we only manipulate bytes, but it is undesirable. > I'm probably missing something, because I don't see would that be > undesirable. It doesn't do anything else than introduce problems (e.g. having to decide how to encode chars even though there are no chars to decode) and inefficiencies. I'm rather curious what you think would be the benefits from using a multibyte buffer here. Stefan