bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#12925: 24.1; string-make-unibyte instead of string-as-unibyte


From: Lars Ingebrigtsen
Subject: bug#12925: 24.1; string-make-unibyte instead of string-as-unibyte
Date: Tue, 01 Jun 2021 09:02:13 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> Why does inserting multibyte text into a unibyte buffer corrupt it
>> like this?
>
> Because the right thing (i.e. signaling an error) was not backward
> compatible with broken code that assumed that chars can be presented
> with 8bit (i.e. code written in the glory days of latin-N, koi-8, ...).
>
> We could/should probably try to do the right thing now, since such
> broken code is probably much less common.

(Now eight years later.)

So the suggestion is to make inserting multibyte strings into a unibyte
buffer signal an error (instead of inserting the lower byte of
characters).

Has anybody experimented with doing this and seeing whether this signals
a lot of errors in daily usage?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

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