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 21147385DC30 for ; Fri, 9 Apr 2021 08:29:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 21147385DC30 Received: from Express5800-S70 (v050190.dynamic.ppp.asahi-net.or.jp [124.155.50.190]) (authenticated) by conssluserg-03.nifty.com with ESMTP id 1398T4rQ016193; Fri, 9 Apr 2021 17:29:05 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-03.nifty.com 1398T4rQ016193 X-Nifty-SrcIP: [124.155.50.190] Date: Fri, 9 Apr 2021 17:29:05 +0900 From: Takashi Yano To: cygwin@cygwin.com Subject: Re: IBM MQ client application fails on latest cygwin Message-Id: <20210409172905.65fe302c88430607afb4f4f3@nifty.ne.jp> In-Reply-To: References: <20210406233716.003ba116ca61f99632bb4dce@nifty.ne.jp> <20210407195624.d77b7459cbdd63504ea495d4@nifty.ne.jp> <20210407200441.860d8b421bf7d29d1e32a6ea@nifty.ne.jp> <20210408201600.9f70ffa0b828a785e70a891c@nifty.ne.jp> <20210408212559.bfa088414864757d8c7dc19d@nifty.ne.jp> <20210408230404.5083209095d8a184dd0b4de7@nifty.ne.jp> <20210409092225.7117a11cb457dd94743b6965@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=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham 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@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2021 08:29:45 -0000 On Fri, 9 Apr 2021 07:54:35 +0200 Morten Kjærulff wrote: > On Fri, Apr 9, 2021 at 7:26 AM Morten Kjærulff wrote: > > > > On Fri, Apr 9, 2021 at 2:22 AM Takashi Yano wrote: > > > > > > On Thu, 8 Apr 2021 18:30:25 +0200 > > > Morten Kjærulff wrote: > > > > Could it be a codepage issue? > > > > > > Maybe. > > > > > > What does chcp.com say in command prompt and in mintty? > > > > 850 > > > > > In cygwin 3.2.0, the codepage, when pseudo console is disabled, > > > has been changed from the default codepage of the system to > > > UTF-8 (65001). If pseudo console is disabled in your environment > > > for some reason, this can affect. > > > > > > Please try to change the codepage using chcp.com to the default > > > codepage of the system. > > > > Then it works: > > > > $ cmd > > Microsoft Windows [Version 10.0.17763.1817] > > (c) 2018 Microsoft Corporation. Alle rettigheder forbeholdes. > > > > C:\mhome>set MQSERVER=BROWSE/TCP/mvs1(1414) > > set MQSERVER=BROWSE/TCP/mvs1(1414) > > > > C:\mhome>chcp > > chcp > > Active code page: 65001 > > > > C:\mhome>amqsbcgc Q > > amqsbcgc Q > > > > AMQSBCG0 - starts here > > ********************** > > > > MQCONNX failed with CompCode:2, Reason:2539 > > C:\mhome>chcp 850 > > chcp 850 > > Active code page: 850 > > > > C:\mhome>amqsbcgc Q > > amqsbcgc Q > > > > AMQSBCG0 - starts here > > ********************** > > > > MQOPEN - 'Q' > > MQOPEN failed with CompCode:2, Reason:2085 > > MQDISC > > C:\mhome> Yeah! Your speculation that this is the codepage issue, seems correct. > > > The default codepage of the system is used also when the > > > pseudo console is activated, so if possible, I recomend to > > > enable it somehow. > > > > > > The reason why pseudo console is disabled, can be one of: > > > - The system is older than Win10 1809. > > > - disable_pcon is set in environment variable CYGWIN. > > > - Terminal does not have enough capability to enable it. (e.g. TERM=dumb) > > > - The "Legacy console" mode is enabled. > > > https://docs.microsoft.com/en-us/windows/console/legacymode > > > > For some reason I was running in legacy mode. Turning it off, make > > chcp display '0' under mintty, but my MQ client works: > > > > $ cmd > > Microsoft Windows [Version 10.0.17763.1817] > > (c) 2018 Microsoft Corporation. Alle rettigheder forbeholdes. > > > > C:\mhome>chcp > > Active code page: 0 > > > > C:\mhome>set MQSERVER=BROWSE/TCP/mvs1(1414) > > > > C:\mhome>amqsbcgc Q > > > > AMQSBCG0 - starts here > > ********************** > > > > MQOPEN - 'Q' > > MQOPEN failed with CompCode:2, Reason:2085 > > MQDISC > > C:\mhome> > > > > > > > > -- > > > Takashi Yano > > Sorry for replying personally and not to the group. > > I have a virtual machine with Windows 7. > It is also a problem here, but here I don't have "legacy mode" in the > command prompt properties. > Any tricks? In Windows 7, console is always in "Legacy mode". Moreover, pseudo console is not supported in Win7. Therefore, the simplest way is changing codepage to appropriate value before executing MQ client. Another solution is to start mintty with charset option, such as: mintty -o locale=da_DK -o charset=CP850 This default codepage change from cygwin 3.1.7 was the anguished choice. https://cygwin.com/pipermail/cygwin-patches/2020q3/010627.html If you are interested in this topic, please reffer to the discussion started from: https://cygwin.com/pipermail/cygwin-developers/2020-August/011951.html I still think that it is not good idea to output UTF-8 string regardless of locale setting. However, some apps do that... :( -- Takashi Yano