> Okay, Emacs works if I in term.c:753 if I use this:
>
> ```
> coding = FRAME_TERMINAL_CODING (f);
> ```
>
> instead of:
>
> ```
> coding = (FRAME_TERMINAL_CODING (f)->common_flags & CODING_REQUIRE_ENCODING_MASK ?
> FRAME_TERMINAL_CODING (f) : &safe_terminal_coding);
> ```
>
> I know docker allocates a "pseudo TTY", so probably that there's a misdetection happening here.

No, it isn't misdetection.  The problem is that safe_terminal_coding
is not set up.

Your patch works, thanks!

Just curious, does that mean that in "normal terminals" (not docker) it uses `FRAME_TERMINAL_CODING (f)` but in docker it uses `safe_terminal_coding`?

If yes, why does it also work in Docker when using `FRAME_TERMINAL_CODING (f)`?

Kind regards,
Philippe