emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: package.el encoding problem


From: Stefan Monnier
Subject: Re: package.el encoding problem
Date: Sat, 25 May 2019 08:15:52 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>> > 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]