From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from conssluserg-03.nifty.com (conssluserg-03.nifty.com [210.131.2.82]) by sourceware.org (Postfix) with ESMTPS id EA3893851C25 for ; Mon, 7 Sep 2020 18:24:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org EA3893851C25 Received: from Express5800-S70 (v038192.dynamic.ppp.asahi-net.or.jp [124.155.38.192]) (authenticated) by conssluserg-03.nifty.com with ESMTP id 087INtIU009039 for ; Tue, 8 Sep 2020 03:23:55 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-03.nifty.com 087INtIU009039 X-Nifty-SrcIP: [124.155.38.192] Date: Tue, 8 Sep 2020 03:24:00 +0900 From: Takashi Yano To: cygwin-patches@cygwin.com Subject: Re: [PATCH 3/3] fhandler_pty_slave::setup_locale: respect charset == "UTF-8" Message-Id: <20200908032400.a3ec467f2bcf8bbfb8f75694@nifty.ne.jp> In-Reply-To: <20200907183659.5150b2a8f296e4df13b1df1c@nifty.ne.jp> References: <20200902195412.aa7f233231d893a7a065b691@nifty.ne.jp> <20200902152450.GJ4127@calimero.vinschen.de> <20200903012500.640e36573c67328fc3e1bc70@nifty.ne.jp> <20200902163836.GL4127@calimero.vinschen.de> <20200903175912.GP4127@calimero.vinschen.de> <20200904182149.18cd752eef58c67ee8d39135@nifty.ne.jp> <20200904124400.GQ4127@calimero.vinschen.de> <20200904235016.9c34d04e809b5ad9f2bdfdf3@nifty.ne.jp> <20200904192235.GW4127@calimero.vinschen.de> <20200905174301.adbb3c147122fbe0636a0d56@nifty.ne.jp> <20200907082633.GC4127@calimero.vinschen.de> <20200907183659.5150b2a8f296e4df13b1df1c@nifty.ne.jp> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin-patches@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component patch submission and discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Sep 2020 18:24:14 -0000 On Mon, 7 Sep 2020 18:36:59 +0900 Takashi Yano via Cygwin-patches 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