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:date:from:to:cc:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; q=dns; s= default; b=JOOXkv8R5HH7405uVS9gDEqeni9zXy4ckJ+Rq2SU7rjwDevwYFooB 0/oDdqQQh0LbR8pPhs4YmoVJJHnBF0BJ6dLvFTlrrkezrvphy7jr8sG8kvEh3481 kYBUt+mvmnCDITdhPEK9kvZkvJv5lf6Q8y7q9w87ekjoEPBNaN87Xc= 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:date:from:to:cc:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; s=default; bh=cMieXNw6hkQP1hiTBuWy/w0rrRI=; b=EpFbfBDyUDj825frtzaxYr/+yzwD yPFgQkEOmpnS/Waduh7L5b1KbBjUQIOSX9I6lXiH+BrlAWcuTzIM1gz37W/kyYWQ 0u4hbPeKe/yMYAJ0XcM8yituQ6iQC+5MzoDYpk8vYsmajjkQa8H4SPEqmuV6bcGh 4N9vT3hmZNzCu9o= 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=-101.5 required=5.0 tests=AWL,BAYES_00,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=H*i:sk:40c92f1, Hx-languages-length:2280, H*f:sk:40c92f1, H*MI:sk:40c92f1 X-HELO: drew.franken.de Date: Tue, 31 Jan 2017 16:32:45 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Cc: Thomas Wolff Subject: Re: [ANNOUNCEMENT] Updated: dash-0.5.8-3 Message-ID: <20170131153245.GA8905@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com, Thomas Wolff 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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="M9NhX3UHpAaciwkO" Content-Disposition: inline In-Reply-To: <40c92f1e987a9162742766816abb4a03@smtp-cloud2.xs4all.net> User-Agent: Mutt/1.7.1 (2016-10-04) --M9NhX3UHpAaciwkO Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Jan 31 16:01, Houder wrote: > On Tue, 31 Jan 2017 14:16:16, Corinna Vinschen wrote: >=20 > [snip] >=20 > > > I'm not quite sure yet but apparently the problem is in the handling = of > > > VERASE in the termios implementation. In cooked mode it fills a char > > > buffer with what has been typed. The code doesn't know if the bytes = in > > > the buffer are UTF-8 chars or just random bytes. So VERASE erases > > > exactly one byte, which means, in case of UTF-8 chars it only erases = the > > > last byte of of a mulitbyte character. > > >=3D20 > > > It seems the Linux termios implementation is different in that it > > > still knows which bytes constitute a single keypress and thus knows > > > how much byte it has to erase. > >=20 > > Ok, here's what happens on Linux: The termios code support a flag > > IUTF8. This flag determines if the termios code checks for UTF8 > > characters in the input when performing an ERASE. It checks if the > > IUTF8 flag is set and if so, it checks in a loop if the just erased byte > > is a UTF-8 continuation character. If so, it erases another byte. >=20 > (Thank you for responding -- and your effort thus far). >=20 > Agreed. One byte or more, depending on the "character" ... (which is > not a problem in case of UTF-8 encoding -- continuation bit). >=20 > Of course, the terminal driver must receive the characters encoded in > UTF-8. >=20 > Therefore the question is: 'can the same situation be created under > under Windows?' (does Windows provide the required support?) This has nothing to do with Windows. It's the termios implementation inside Cygwin. I created a patch introducing the IUTF8 flag as on Linux as well as a code snippet trying to remove entire utf-8 characters from the input if the IUTF8 flag is set. And it's set now by default since we default to UTF-8 anyway. Thomas, you may want to check for the IUTF8 flag in upcoming mintty versions and unset it if character set configured in the mintty options dialog is !=3D UTF-8. I uploaded new developer snapshots to https://cygwin.com/snapshots/ with this patch. I'm also going to release a Cygwin test version later today. HTH, Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --M9NhX3UHpAaciwkO Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJYkK4dAAoJEPU2Bp2uRE+gyHoQAICN6cVqW+kyFUy7hV6YjbnF 1sq9nBd4eU3oALLmL+Dqrx8c5e/stA0BxmkjM1VbbWScJfseVXO8FaBpgXsG6GLe ZZWpFrFHfcoWnyJk4IDPHpfrmiS2wsAaqo8gqB3Hv+yuzGOxv22cGFzrkwrXt28X RteJvwHd7wwHVNkyXMRXdrOmJGgk9GT7oGkUshhrZx67pn0NKSwAbj9AJlDJPw+B DUAAGODsCZrycPaiDqr76eBqhFc3mJVg6Xu1zM7fRFUzWDPONTMdxgrZ5wJNpliU iFlXRRWX4rGx7G9Jla0M0FrqbWU1Fmok3d0t/Iwr2Rq3UzsPKXTRyE2YyTVSc8d4 M9NzxgHVLqmwQtmhdTwjBPE1UF9SinAJbAKmWFjnrLzwJU8gPx379Q6vpXAJgQmZ wV1gu19PO1DA9y8CzZGgI9D9cPQX6uPZodBJsQ8ri/iBXlrzunbLTLG3FfO3Av4t RMVTZt1+qBDz88K3A0MhbOlxv0Xocglail67o2RJ5ImWEoA6LH31UUmdWXK/H4IZ xP94C9TMXp6KbFrYRM+Z7+PsBLw1qhDCUGqmXb1HxlXit9RFRjuW304qZidNO+aC AFPjFrNLmjPjzlAUK5fKEQHHTgfV3s0dqZdjIuPIbJMNbwf3Vb/GhGwxl+BaVUTT eIVAaltbiVcwINOAXcnq =rzCY -----END PGP SIGNATURE----- --M9NhX3UHpAaciwkO--