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 08:15:52 -0400 Message-ID: References: <87blztw65c.fsf@wavexx.thregr.org> <83k1ef3ugs.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="168908"; 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 14:18:00 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 1hUVce-000hpm-Dm for ged-emacs-devel@m.gmane.org; Sat, 25 May 2019 14:18:00 +0200 Original-Received: from localhost ([127.0.0.1]:40205 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hUVcd-0004Bn-DD for ged-emacs-devel@m.gmane.org; Sat, 25 May 2019 08:17:59 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:34699) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hUVak-0003FR-5r for emacs-devel@gnu.org; Sat, 25 May 2019 08:16:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hUVai-0005uK-Mn for emacs-devel@gnu.org; Sat, 25 May 2019 08:16:01 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:33320) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hUVaf-0005ok-Ah; Sat, 25 May 2019 08:15:57 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 88427442B0D; Sat, 25 May 2019 08:15:55 -0400 (EDT) Original-Received: from mail02.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id CFE83442B0A; Sat, 25 May 2019 08:15:53 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1558786553; bh=ZYagFqFqxl00+GayJQPDi07x5j6zVcrTxDsIbicLiDQ=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=KHRVP3RR9lHZePsGz31jXzwk4EsqXcgxj3bkBMrsXEu6ZWyX17YQ5Ae4NyDY+Pr4n n7wPzn14wLdo/fQW80GCDTYbQ/1U0W2eWjOyHHcCHzut19pFCVHxzTpqFX9fDxtGru d3DgITYxqon1jEWOvtDUJm3kQGlvAAi+d2B60jpYaJEq87GdC+t1qpXCiWlRfU/Dnn FDq2CC5lOAmlgygEebNjmjuhRdVCYf8U60FyoCoh8sQkodZo3f79/TaT1KDAQ2Xgja g/EbXkS1wjwjBOLTy0/rTqv6xWd/HXUnmZtwXDsF+znPLhil3ufDdIVtFAh7hLsVuD DIpz00tKbcaTA== Original-Received: from pastel (unknown [167.88.27.42]) by mail02.iro.umontreal.ca (Postfix) with ESMTPSA id A8F321201F1; Sat, 25 May 2019 08:15:53 -0400 (EDT) In-Reply-To: <83k1ef3ugs.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 25 May 2019 09:43:15 +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:236977 Archived-At: >> > Can you enable "Options => Enter Debugger on Quit", then reproduce the >> > problem then hit C-g when you get the prompt? >> > [ Or do `M-: (debug)` when you get the prompt. ] >> Don't bother I managed to reproduce it after all. It should fixed, thanks, > Thanks, but I don't think I understand the fix. As you can see in the fix's assertion, the data we receive is a unibyte string and we need to save it into a file. 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. We did try to circumvent this problem by specifying `no-conversion` coding system, but I think the way we did this wasn't quite right. Rather than try to fix the circumvention, I decided to "do it right" and use a unibyte buffer so the question doesn't show up. > I thought the need for unibyte buffers was removed long ago, at least > in the vast majority of situations. It is definitely *possible* to use multibyte buffers even in cases where we only manipulate bytes, but it is undesirable. Stefan