[PATCH 3/3] fhandler_pty_slave::setup_locale: respect charset == "UTF-8"

Takashi Yano takashi.yano@nifty.ne.jp
Mon Sep 7 10:27:13 GMT 2020

On Mon, 7 Sep 2020 10:26:33 +0200
Corinna Vinschen wrote:
> processes via cygheap.  The idea is to get rid of the complex
> setup_locale code in every execve call and just set it once in a process
> tree starting at the process creating the ptys.

This cause a problem if mintty is started from another
mintty using diffrent charset. If the child mintty
inherits cygheap, term_code_page is not changed.

1) Start mintty (UTF-8).
2) Start another mintty by 
     mintty -o charset=SJIS
   from the first mintty.

In this case, the second mintty inherits cygheap having
locale.term_code_page == UTF-8, while the correct
term_code_page is SJIS (CP932).

Therefore, term_code_page should be determined per pty.

Takashi Yano <takashi.yano@nifty.ne.jp>

More information about the Cygwin-patches mailing list