On Sat, Feb 10, 2024 at 08:49:08PM +0100, tomas@tuxteam.de wrote: > On Sat, Feb 10, 2024 at 09:41:15PM +0200, Eli Zaretskii wrote: [...] > > Yes: decode-coding-region. > > Ahhh -- thanks a bunch for this one! How could I have missed it. > > > > (...) But that feels > > > a bit... gross: > > > > Indeed. Why didn't you try decoding to begin with? OK, now I can answer this question more precisely: actually, I'd been there already and was coufused that the function did... nothing. Now at least I know why: the buffer is unibyte. Its content /is/ utf-8. So if I set the last argument to nil (i.e. decode-in-place), it replaces region with its utf8 byte sequences -- an identity operation (unless there is erroneous UTF-8 around). If I give it a multibyte buffer as last argument things look much better. But then... I can do things "in buffer" by simply invoking (toggle-enable-multibyte-characters t). At least, it seems to work. But... is it a good idea? Cheers & thanks -- tomás