X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type; q=dns; s=default; b=L1qx xfUbdXaLAAkxPhdj11oWmsjzxGs4TUgOCNEY2xCtDyU4SICqRZfx3d1b+CAQeat8 CkMCkxxdElOMIZtOQ2bEnur0fCAc/46ba4Jc9JZPsCcJR/B35IEqHZQV52VP5Pim CdiSVUenQg7bb5p1dDRruLGOPzZB1PvgtWsr5m4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type; s=default; bh=Krq7ogbyMG CLLrM1SqbE5UiTCZw=; b=udUVOcOKCYu8rVRBYEvE6C49w7719MukbhV1sEKgQR mh9GGZ04PyHGom94V6gnJvkuTXRedcgvu8jMKi+FSwMa3oZmB7W8LvgQ10Ztg48F 0WgCSHpPTTGHZ8IC7GP5C8R/T0Ls7BqXf7d4Gj6oEOXHy6lTC59UVIywmR0n2V8w s= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=ing, H*f:sk:09253e2, H*MI:sk:09253e2, H*i:sk:09253e2 X-HELO: mx1.redhat.com Subject: Re: [ANNOUNCEMENT] Updated: dash-0.5.8-3 To: cygwin AT cygwin DOT com References: <58893f48 DOT 0850ca0a DOT 6c5d DOT 5fde AT mx DOT google DOT com> <81b5af354b7a3925ff0a68dcc063265f AT smtp-cloud6 DOT xs4all DOT net> <20170131100402 DOT GB29504 AT calimero DOT vinschen DOT de> <20170131131616 DOT GC29504 AT calimero DOT vinschen DOT de> <40c92f1e987a9162742766816abb4a03 AT smtp-cloud2 DOT xs4all DOT net> <20170131153245 DOT GA8905 AT calimero DOT vinschen DOT de> <09c7b42a-7b8d-52b7-ce18-4e681eb51f05 AT towo DOT net> <20170214084537 DOT GD25846 AT calimero DOT vinschen DOT de> <09253e2d-af27-ddca-2b49-b65460440f69 AT towo DOT net> From: Eric Blake Openpgp: url=http://people.redhat.com/eblake/eblake.gpg Message-ID: <6488d88d-f6b8-674d-692c-8372977a4707@redhat.com> Date: Tue, 14 Feb 2017 13:56:36 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <09253e2d-af27-ddca-2b49-b65460440f69@towo.net> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="g46h5aVbjwK3ws5S51NubtbjqqITXJK1q" X-IsSubscribed: yes --g46h5aVbjwK3ws5S51NubtbjqqITXJK1q Content-Type: multipart/mixed; boundary="4cIUbbEM0Dme5MeHIXPEuvELFdshqxLp2"; protected-headers="v1" From: Eric Blake To: cygwin AT cygwin DOT com Message-ID: <6488d88d-f6b8-674d-692c-8372977a4707 AT redhat DOT com> Subject: Re: [ANNOUNCEMENT] Updated: dash-0.5.8-3 References: <58893f48 DOT 0850ca0a DOT 6c5d DOT 5fde AT mx DOT google DOT com> <81b5af354b7a3925ff0a68dcc063265f AT smtp-cloud6 DOT xs4all DOT net> <20170131100402 DOT GB29504 AT calimero DOT vinschen DOT de> <20170131131616 DOT GC29504 AT calimero DOT vinschen DOT de> <40c92f1e987a9162742766816abb4a03 AT smtp-cloud2 DOT xs4all DOT net> <20170131153245 DOT GA8905 AT calimero DOT vinschen DOT de> <09c7b42a-7b8d-52b7-ce18-4e681eb51f05 AT towo DOT net> <20170214084537 DOT GD25846 AT calimero DOT vinschen DOT de> <09253e2d-af27-ddca-2b49-b65460440f69 AT towo DOT net> In-Reply-To: <09253e2d-af27-ddca-2b49-b65460440f69 AT towo DOT net> --4cIUbbEM0Dme5MeHIXPEuvELFdshqxLp2 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 02/14/2017 01:40 PM, Thomas Wolff wrote: >> No. We're talking about a function in the master side of the tty, while >> the applications started in the terminal are on the slave side. > I am not familiar with the concept of setting termios properties on > either the master or slave side of a pty. I've only ever set them in the > client application, including my tests about IUTF8 which worked. Would > setting on the master side imply it's set for the clients implicitly, > and can it be changed later, e.g. when mintty character encoding is > being changed from the Options dialog? > And you say the function of erasing characters on BS is in the master > side? To be honest, this confuses me. I thought it's a client function, > like readline() would perform if used (apparently not by dash), which is > kind of an enhanced version of the tty cooked mode and used to work even > without the new flag, right? The readline source code does not mention IUTF8; and neither bash nor dash need to reference it, because if the tty handling code sets it correctly for what the terminal is going to display, then the clients that are read()ing from the tty never even see BS in cooked mode (the master side of the terminal handles BS before the read() completes in the slave, if I'm understanding it correctly). >> iutf8 is set in Linux by default and by most terminal applications ionly >> reset if the LC_CTYPE setting in the environment of the terminal >> application is not set to the utf8 codeset. This is determined at >> terminal startup, not by the inferior processes runnin in the terminal. >> The applications still can set iutf8 via termios control (or stty(1)). > Will you patch stty as well to address the new flag? Already patched; coreutils-8.26-2 was promoted to current yesterday. >=20 >> For mintty I just thought it might be helpful to honor the character set >> setting in its options and to default to iutf8 if it's not set. > Sure, but it would be better to find a solution that implicitly works in > all terminals. Isn't it possible to handle this in forkpty()/openpty()? Does forkpty()/openpty() currently pay attention to environment variables to even know what encoding is currently in use? And what's to say that the environment used to fork the master side will match the locale settings of the slave process that connects to the pty, so how do we know whether to default IUTF8 on or off based solely on the slave's environment, when it is the master that is handling BS and therefore the master's character encoding that matters for how much BS should erase ? --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --4cIUbbEM0Dme5MeHIXPEuvELFdshqxLp2-- --g46h5aVbjwK3ws5S51NubtbjqqITXJK1q Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJYo2D0AAoJEKeha0olJ0NqIdEH/jXm3SfnoWq8pG3H9G81DTK3 0nwpA44rEvDX4c87Z0DxW1C7c0dNbYcBoV9Py+N+aTiSQ3dEBHdDRktGpzx3UCbn DTLx/eYNv00sKs+/GmZDpsN1V3ocpPMINb7ibQVQUtiwKvjsDoHiJhxSDKFNshCv RBmHfkupbHUVGjVc6qnW62WQHm3i+nQJTxARVAv5ycetmUsnp9t1wCWLCQY4YYdC OVHT/LdhSrQyBWzt4sf3mjt7eD4hY6DQsMhdH1cuJSrzXP+1APARL8jCS+gHoPpq D460VgzoBfAPa5eO2fTNBNKBauMrt7FzV9sQu8VfXQ9lkVgC1zpTNnyz1ibt/Tc= =QyW2 -----END PGP SIGNATURE----- --g46h5aVbjwK3ws5S51NubtbjqqITXJK1q--