delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/01/31/08:16:45

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:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=PUvyuWPg8nOdhOnTP5QtRzR5egvi4dwFhUex71GMxlkXdsjz61Fh8
ijth/VhopmKpJ0l2PusNgjSFsbjpU0e4CPjM+SpageFWqNL5rIzNywagwvlejSIA
Q+WGMlXlbb+o7T9CENT1a+iZnPFc7tD+v4VC1rL7U3lfFxGVtCtde8=
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:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=JmlnpVL5AEM8ifseiR/IaOgh8L8=; b=T+CAQLFs1q83NLGqa1wgftLGaPWX
kw40dQTlZiAIzmR1pxc9ms+gNfE5dmZXzHJkrmiNqgPzk7/PWUUjSLwDoxxnDiaC
cCmMZjOFt8VqCCm3ptUP26EWbL5m9bk8sroJEG6CgM2IfA4bSk/7tmxxVgET1CBE
LVwOs5tuhgbnLmA=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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.4 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=Hx-languages-length:2463, cooked, management, H*F:D*cygwin.com
X-HELO: drew.franken.de
Date: Tue, 31 Jan 2017 14:16:16 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: [ANNOUNCEMENT] Updated: dash-0.5.8-3
Message-ID: <20170131131616.GC29504@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <d58b09904f6fc607e5c044e67a02f393 AT smtp-cloud3 DOT xs4all DOT net> <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>
MIME-Version: 1.0
In-Reply-To: <20170131100402.GB29504@calimero.vinschen.de>
User-Agent: Mutt/1.7.1 (2016-10-04)

--/NkBOFFp2J2Af1nK
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Jan 31 11:04, Corinna Vinschen wrote:
> On Jan 28 14:44, Houder wrote:
> > On Wed, 25 Jan 2017 16:14:00, Steven Penny wrote:
> > > Obviously Bash is not the problem, nor readline as Dash doesnt use re=
adline. So
> > > it appears the issue this time is again with cygwin1.dll, or perhaps =
the Dash
> > > package.
> >=20
> > .. uhm, it appears to me that Windows is the issue here.
> >=20
> > As those in the know do not feel inclined to respond, I will provide so=
me
> > guesses that are my own:
> >=20
> >  - in terms of input buffer management, utf-8 encoded characters will n=
ot
> >    be recognized in case of bash and dash ... (they are under Fedora)
> >     - see the output of stty -a: iutf8 is not present (it is under Fedo=
ra)
> >  - readline provides bash with input buffer management for utf-8 encoded
> >    characters on Windows (that is why it 'works' in case of bash)
> >  - bash has support for utf-8 encoded characters ...
> >    (e.g. ls -l ? will include one-character filenames in case the name =
is
> >     made up of only one multi-byte character)
> >  - dash has no such support ... [1][2]
> >=20
> > Consequently, dash is only partly useful, even more so on Windows (as it
> > would require an additional "helper" on Windows in order to obtain prop=
er
> > line-editing). Helper? readline, libedit ...
> >=20
> > However, I am only guessing ... (only Erik and Corinna can provide expe=
rt
> > details here).
>=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.
>=20
> 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.

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.


Corinna

--=20
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--/NkBOFFp2J2Af1nK
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJYkI4gAAoJEPU2Bp2uRE+gh/MP/32u6HocE9E+wuJJ6pOmZiq2
Som1negFDtQgFznqZmIAOwQ08TaeT1Zvx9XgUul2vIzOcdrwkk3LD80/YYbkrU8+
aN95FG6Y1v6jTyzTbPWaGXuoesrLxOrDdrZJXuDSTf43TmeAyvhGgSzx/Ucz8c2y
RobqGrZgod9Bc+TgDqkGEQAUowO0zJ0wQr2Y5KQF1fFJmCOvolnSHDJfhCdLAJsx
ryt7Gpsjl0zFyEmp95hCaDn0+3ahqd+D8T9lmHcNsSt+IO/CEHkQlUKGGRTkxu1I
OFf8GqDXQZCVssEVHW35OUXWKosPWK92MaVKaFNZx007Npu+HVmwtNXG762gWS5K
SqbHtHxQqRRN2mrO9TL1v/SaVAjibHtiYUnKcl5CMLEZDhbveSohpnLRG5phXGhL
icJNtpMOzo23+HjRqKFlYOo+eEK5O4KhmY+0A1IjN8bflY5x+KB/wIziJXoq0Ji7
tE73BVR8K9jr2Q1V1gMxBGLtv1o9qC41eggpNgMp5DUXtth5DjaatiJR8aeg/bCi
UXtuXqHk3AhEJadXJi67yHf/hXTp3Olk9obbDt9kcDz6itNFLk6o007jh3b9ozAf
PomFWv/ssB98NOXRki6fXX1DpZGdlNSADVviYb1BBXoEizzQiiTEfdSEGJMXu+jn
4gNtpkjUOoG4Y+jLW6l+
=HVvo
-----END PGP SIGNATURE-----

--/NkBOFFp2J2Af1nK--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019