From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: package.el encoding problem Date: Sat, 25 May 2019 16:47:06 +0300 Message-ID: <83ef4m4pet.fsf@gnu.org> References: <87blztw65c.fsf@wavexx.thregr.org> <83k1ef3ugs.fsf@gnu.org> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="25737"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat May 25 15:47:45 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 1hUX1V-0006cD-8b for ged-emacs-devel@m.gmane.org; Sat, 25 May 2019 15:47:45 +0200 Original-Received: from localhost ([127.0.0.1]:42395 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hUX1U-0004q4-9u for ged-emacs-devel@m.gmane.org; Sat, 25 May 2019 09:47:44 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:51458) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hUX0w-0004pn-0d for emacs-devel@gnu.org; Sat, 25 May 2019 09:47:10 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:59642) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hUX0v-0001Or-IX; Sat, 25 May 2019 09:47:09 -0400 Original-Received: from [176.228.60.248] (port=3888 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hUX0u-0004X0-Mz; Sat, 25 May 2019 09:47:09 -0400 In-reply-to: (message from Stefan Monnier on Sat, 25 May 2019 08:15:52 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:236979 Archived-At: > From: Stefan Monnier > Cc: emacs-devel@gnu.org > Date: Sat, 25 May 2019 08:15:52 -0400 > > >> > 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. Yes, which is why I said I didn't understand the fix. Multibyte buffers can handle raw bytes without any problem. Or at least I thought they did. > 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. Could you perhaps show a recipe for the problem? I'd like to look into what happens there. > 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. Hopefully, a reproducible recipe will show me the light.