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

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

Re: `write-region' writes different bytes than passed to it?


From: Eli Zaretskii
Subject: Re: `write-region' writes different bytes than passed to it?
Date: Tue, 11 Dec 2018 20:05:57 +0200

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Date: Tue, 11 Dec 2018 11:36:13 -0500
> 
> > Yes, because "\xC1\xB2" just happens to be the internal multibyte
> > representation of a raw-byte F2.  Raw bytes are always converted to
> > their single-byte values on output, regardless of the encoding you
> > request.
> 
> Maybe we shouldn't encode unibyte strings (under the assumption
> that a unibyte string is already encoded: it's a sequence of bytes
> rather than a sequence of chars).

I'm not sure that single use case is important enough to change
something that was working like that since Emacs 23.  Who knows how
many more important use cases this will break?

This whole area is crawling with heuristics, whose only justification
is that it does TRT in the vast majority of use cases.



reply via email to

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