Might be somehow related to bug 57486. That one also doesn't happen to
me anymore, though this might be because it got fixed by side-effect,
since I have recompiled Emacs several times since then. But that bug
happened to me at least twice (with Emacs restarted etc.) on different
days. I could immediately tell since our Java application won't even
compile if system encoding is not UTF-8.

Paul

On Wed, 14 Sept 2022 at 20:23, Lars Ingebrigtsen <larsi@gnus.org> wrote:
Paul Pogonyshev <pogonyshev@gmail.com> writes:

> Hm, now I cannot reproduce this anymore. But today I got this bug,
> recompiled Emacs from Git and the bug was still there. Right now I
> tested Emacs 28 in case I managed to switch them accidentally, but
> no, also not there.
>
> So, either I have mixed something up, or this depends on some
> volatile state in TRAMP, e.g. its cache.
>
> I guess you can close the bug.

Perhaps Michael has some comments here, so we'll wait for him to chime
in before closing, I think.