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

Takashi Yano takashi.yano@nifty.ne.jp
Mon Sep 7 18:24:00 GMT 2020


On Mon, 7 Sep 2020 18:36:59 +0900
Takashi Yano via Cygwin-patches <cygwin-patches@cygwin.com> wrote:
> > This is really confusing me.  We never set the console codepage in the
> > old pty code before, it was just pipes transmitting bytes.  Why do we
> > suddenly have to handle native apps running in a console in this case?!?
> 
> This is actually not related to pseudo console. In Japanese environment,
> cmd.exe output CP932 string by default. This caused gabled output in old
> cygwin such as 3.0.7. The code for the case that pseudo console is
> disabled is to fix this.

If your question is "Why is GetConsoleOutputCP() used for
non-console handle?", the answer is "I am not sure why, but
it affected by codepage". Even with cygwin 3.0.7 which does
not support pseudo console, chcp.com works.

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


More information about the Cygwin-patches mailing list