From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.131]) by sourceware.org (Postfix) with ESMTPS id 4AAC93959E43 for ; Mon, 31 Aug 2020 17:39:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4AAC93959E43 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=towo.net Authentication-Results: sourceware.org; spf=none smtp.mailfrom=towo@towo.net Received: from [192.168.178.45] ([95.90.245.244]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1M8C8J-1kHSbC3klH-005LZo for ; Mon, 31 Aug 2020 19:39:05 +0200 Subject: Re: New implementation of pseudo console support (experimental) To: cygwin-developers@cygwin.com References: <20200722174541.c8113635236fd217cb9ebb77@nifty.ne.jp> <20200723093328.709654ea6a539cb9b3251ab2@nifty.ne.jp> <20200724143842.020cea9ffa2f6e7ffe760f67@nifty.ne.jp> <20200724202219.16ad238f515da19db21d3a6c@nifty.ne.jp> <20200803111103.27ef6554df7f40d1142bceee@nifty.ne.jp> <20200803212342.8b14a3164ed66bd521774fe4@nifty.ne.jp> <20200811201258.4bffb987ecdb96583c516bc2@nifty.ne.jp> <20200813185813.2d851113b6e134db371d35b4@nifty.ne.jp> <20200817205718.a0fcc08bf21be4ba5f10ba3d@nifty.ne.jp> <20200819203959.9d220306c58736f94381d1e6@nifty.ne.jp> <20200819134156.GP3272@calimero.vinschen.de> <20200820170210.e066c8ad933ca31061130ba9@nifty.ne.jp> <20200831231253.332c66fdddb33ceed5f61db6@nifty.ne.jp> <20200831235325.c26c1a75e4cec737e793c91c@nifty.ne.jp> <9f0e8248-cc3b-b5a8-0af5-43dbdf079478@towo.net> From: Thomas Wolff X-Tagtoolbar-Keys: D20200831193905532 Message-ID: <1104c24d-49ea-96b9-30cb-acd4460108ab@towo.net> Date: Mon, 31 Aug 2020 19:39:05 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <9f0e8248-cc3b-b5a8-0af5-43dbdf079478@towo.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:CEjvQmXFTlmHSgqD8snmu4GdTZL0MMTuGrybyrXJI2BbNx+tjCR uTpEUmUdCTRfkY1jZyqFEuNGjcEEC8VrPIwIcnoyKM0NY3KdOByO6QHVMPaYbIoRWPq4ocM dcbwV54yrLYAFdlHbfRcFmtTZVYNHKWKDe2wv/rfEV3RZhOy6XBavn8JoTzXiKE8R26ks7X jgQWIde2RkKUWtsqD+jdQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:xLkMpwPZikg=:C9n3YdEAY7+k/ZCit1t4XS RrmLRuvQfKqF/Uvzwzg7Hhbv9HkPhtmaZlgsvAfIZgtaoxhuny9fDf9Ntw1e3htmSfdreC9ls YidE2zaq4gce8UxIty6zEp9k5wrGWCrIoIrjbMi+okPDKgZFBZ2BeM+69GJYaBIDHNeXvHNvs yz0EX4Tk+kdQBA7C0HFFZw8+6eda4mLzyGqGhTpKaukdyvL//Ob/CvjXv1uJVt5lazTH7eCIr kPwtHEcoLfShTfBK7V+AW92l/0QzJifA3jMD4cF4WOUNc8VJHNaI/7bRXW081PvQC9jgEvwTJ byYANlBSc2ZOhofi/7ZmQHFABkGHqep1hyImAiA4bNoDpHvxDXiYaOVAF7+WulJv6QSqkxsav XUzHOyQg3iXfSrxF/lM4wZ5GRODRv9K55bPtG4aYVPamin/Tk1KW+RsYmT5dRL7/IkFTIy1/Q ct9pUIf8yaDziqdUlJ4lz4fT8+fwiCphHfSa6P7mSpCAWOUy4cEVNmThX/bOg3DrKofjtwNYQ DJ64v0YcHMzbtVZn3p2XQFl/dcr3DtlAiOSyfBq5ehwPH3vYg6b/+xvZAEAr9hTJdgp6glRgz DL+vmfsHd4qVZIP6f7sFNPKg0ceVLciwD+dIzRPSCiv+J4M/OdEDju5dylit25YEnYagsIpjD J2+g1h0nAKKvFIE5qUfw9NACLVfvkftvZb8U4YGiSe6moYTp3kNrgo1ZX27A0+zbfldJ9ZEeo YFjojEqMwq/dpmUzzMlLDiOlmN5K4HNgrWa+4tzNW9ST51/8WU6Y32+nQ0+4du62V8M73Rrxx KwP+E605oSgWhM1jkcevB+GniFwCn1QZQ0b77eYTQpeXTwKZ53bHKsBLlL4WBAlxIRmtqXN X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00, BODY_8BITS, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, 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-developers@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component developers mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Aug 2020 17:39:09 -0000 Am 31.08.2020 um 18:12 schrieb Thomas Wolff: > > > Am 31.08.2020 um 17:56 schrieb Johannes Schindelin: >> Hi Takashi, >> >> On Mon, 31 Aug 2020, Takashi Yano wrote: >> >>> On Mon, 31 Aug 2020 16:22:20 +0200 (CEST) >>> Johannes Schindelin wrote: >>>> On Mon, 31 Aug 2020, Takashi Yano wrote: >>>> >>>>> On Mon, 31 Aug 2020 14:49:04 +0200 (CEST) >>>>> Johannes Schindelin wrote: >>>>> >>>>>> Sorry to latch onto this thread with something slightly >>>>>> different, but we >>>>>> do see pretty serious encoding problems (both with and without >>>>>> `CYGWIN=disable_pcon`) in the Git for Windows and the MSYS2 >>>>>> projects. For >>>>>> example, in https://github.com/msys2/MSYS2-packages/issues/1974 the >>>>>> following issue was reported. If you compile a _MINGW_ program >>>>>> from this >>>>>> source code: >>>>>> >>>>>> -- snip -- >>>>>> #include >>>>>> >>>>>> int main(){ >>>>>>    puts("Привет мир! Hello world!"); >>>>>>    return 0; >>>>>> } >>>>>> -- snap -- >>>>>> >>>>>> and then execute it, you will see this output: >>>>>> >>>>>> -- snip -- >>>>>> ╨ƒ╤Ç╨╕╨▓╨╡╤é ╨╝╨╕╤Ç! Hello world! >>>>>> -- snap -- >>>>> I guess your program (binary exe) does not work as you expect >>>>> in command prompt as well. If you want to use UTF-8 coding in >>>>> output, you should add SetConsoleOutputCP(CP_UTF8) call befere >>>>> puts(). >>>> That may be, but I would like to point out that the very same >>>> executable >>>> worked quite well in a MinTTY using v3.0.7... > Assuming the test program source file is encoded in UTF-8 when > compiling with x86_64-w64-mingw32-gcc, the string would be output byte > by byte, which happend to be interpreted in UTF-8 when run in a > terminal on cygwin 3.0.7, although the program was not set up to use > UTF-8. > The "correct" output was actually buggy behaviour, so current cygwin > has "fixed" it, to your disadvantage in this case. > With ConPTY support, matching encoding on Windows and terminal side > need to be taken care of. My wording was misleading. Maybe it's proper to say it this way: Matching encoding on each side between application and respective system is needed, as ConPTY transforms encoding properly on system level. > Thomas > >>> at the expense of garbled output for apps which use native >>> code page of the system in the correct maner. >> Are you referring to apps that call the SetConsoleOutputCP() >> function? If >> so, I am asking myself what would be broken. Because apps that do _not_ >> call that function (expecting UTF-8 to be active) would be fixed, while >> apps that _do_ call that function would not care if the Cygwin runtime >> changed it. >> >> Ciao, >> Johannes >