From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14531 invoked by alias); 6 Apr 2019 21:33:17 -0000 Mailing-List: contact cygwin-developers-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner@cygwin.com Mail-Followup-To: cygwin-developers@cygwin.com Received: (qmail 14521 invoked by uid 89); 6 Apr 2019 21:33:16 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=explained, bash, java, session X-HELO: mout.kundenserver.de Received: from mout.kundenserver.de (HELO mout.kundenserver.de) (212.227.17.24) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 06 Apr 2019 21:33:15 +0000 Received: from [192.168.178.45] ([95.91.242.222]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.183]) with ESMTPSA (Nemesis) id 1M2OIy-1hCKRJ2Um6-003vhY; Sat, 06 Apr 2019 23:33:07 +0200 Subject: Re: [PATCH v3 0/1] Pseudo console support in PTY (v3) To: Takashi Yano , cygwin-developers@cygwin.com References: <20190404104606.GA24725@calimero.vinschen.de> <20190406111308.1822-1-takashi.yano@nifty.ne.jp> From: Thomas Wolff Message-ID: <4b4aae13-877c-8521-54c5-dcf2dafbc66d@towo.net> Date: Sat, 06 Apr 2019 21:33:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190406111308.1822-1-takashi.yano@nifty.ne.jp> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2019-04/txt/msg00024.txt.bz2 Hi Takashi, > The major changes from v2 is as follows. My testing showed the following observations. > ... > > (3) Code page handling is refined a bit. Now, code page 65001 (UTF8) > and native code page in your region should work without garbled > characters. This works properly only on terminal which supports > UTF-8. Character output conversion works with my test program (using WriteConsoleW). Using java, output works too (with proper java encoding option), but non-ASCII input characters are replaced by and echoed as space. If I try a non-Unicode terminal session, e.g. running mintty -o Locale=C -o Charset=CP1252 -, and enter a € key, mintty hangs. While you said it doesn't work (yet), it should better not hang at least. I'd like to repeat at this point that the whole mechanism should only be applied if a non-cygwin program is run. (If it were, entering € in bash would not block the terminal.) > (4) Synchronization between real terminal and pseudo console screen > buffer is improved. For this, screen is cleared on startup of pty > slave app. Also echo for key input is pushed into pseudo console > screen buffer. Do you actively synchronize anything? I thought this is not needed anymore (unlike winpty) because the ConPTY performs the adaptation. Terminal reports "\033[6n" and "\033[0c" are apparently emulated and sent in reverse order; response to primary device attribute request is wrong (not what mintty would report). There is no response to secondary device attribute request ("\033[>0c") and others, e.g. '\033[18t' or '\033]10;?\033\' and many others; why can't these requests be passed to the terminal and handled transparently? (You explained something around handles before but I don't get the point.) Output to alternate screen seems to be forced to the primary screen, mostly; if I try to switch screen in various ways (menu, echo "\033[?1047h" > /dev/pty1, before or while cmd.exe runs), behaviour appears to be inconsistent and not as expected (expected behaviour is that any output goes to the active screen). Again, I don't see a need that you intercept this at all. Thomas