delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/07/31/17:13:49

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=yC4GYrOqJgQB/c9VNi7OR0TKCBPyzD+dV01eYoShnOJul+aide8D6
44fK0jyb4yn+6q8P13YbqgrP+y+yR8A26hny5B4Ip+5jKTquyc8eAR2exKk969R/
pffgjbFtj1FXt90K0qwvqz1kgDbJZH/r2OVhTlLEfCDAg3vFSSitXA=
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=t05DbTVck2iCiYOiSIENH0fbBto=; b=xTe18hQbs9G94N3ltysSD43oxueO
lY3vaQNoToGGPuXImOxOLRCB5bG3umu7+TYUquB0vG1xGBmw/OU0TAnek3GcdhX5
lAUkjmWnl0Hs+a96RdDAS4KxMrU8AHgibnoOEdvTTpp1RyY1K1Tb9AJDjd0NqtqU
x0SD1XZkF/QHCtQ=
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.9 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=Further, announcement, H*c:application
X-HELO: drew.franken.de
Date: Mon, 31 Jul 2017 23:13:27 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: [ANNOUNCEMENT] Updated: libreadline7-7.0.3-3
Message-ID: <20170731211327.GG18950@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <60db3460-a1c1-7cc2-0369-a7109d782ea0 AT redhat DOT com> <597b2988 DOT 4338ca0a DOT 87fc4 DOT 4954 AT mx DOT google DOT com> <20170731094812 DOT GJ24013 AT calimero DOT vinschen DOT de> <477581a5-7e4a-2bb2-99c6-80a751f5a691 AT gmail DOT com> <20170731200146 DOT GD18950 AT calimero DOT vinschen DOT de>
MIME-Version: 1.0
In-Reply-To: <20170731200146.GD18950@calimero.vinschen.de>
User-Agent: Mutt/1.8.3 (2017-05-23)

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

On Jul 31 22:01, Corinna Vinschen wrote:
> On Jul 31 14:36, David Macek wrote:
> > On 31. 7. 2017 11:48, Corinna Vinschen wrote:
> > > Well, it works for me.  I tested this in tcsh, bash and od on
> > > Windows 10.
> >=20
> > I tested on Windows 2012 R2 (8.1 equivalent) and I can confirm
> > Steven's findings.  Tried with an older installation and then once
> > more after a complete update (`uname -a`s below).
> > [...]
> Further debugging shows that Alt-Numpad doesn't work on Windows 7
> because the OS doesn't return the required information.
>=20
> Huh?  Why then does it look like only bash is affected?
>=20
> Other tools, including tcsh, just read from the console, which means,
> only calling ReadConsoleInput under Cygwin's hood.  Readline on the
> other hand, uses select.  Select in turn uses the Windows function
> PeekConsoleInput.
>=20
> And as far as I can tell, PeekConsoleInput has a bug in terms of CP
> 65001 on W7.  After lifting the left ALT key, PeekConsoleInput reads an
> input event for the key up event.  If this is the end of a Alt-Numpad
> sequence, the event contains the resulting unicode character.  But not
> so if the codepage is 65001.  In this case the returned unicode
> character has the value 0.  And a subsequent call to ReadConsoleInput
> will also get a unicode char value of 0.
>=20
> As far as I can see there's no way around this, [...]

Ahhhhh, no, no, no.  I found the problem.  When using CP 65001 on
pre-W10, you *must not* use the ANSI functions PeekConsoleInputA and
ReadConsoleInputA, but select() was still using them as it did so for
ages.

Now using the UNICODE functions PeekConsoleInputW and ReadConsoleInputW,
select is doing the right thing even with CP 65001.

I applied a patch and uploaded new developer snapshots to
https://cygwin.com/snapshots/


Please test,
Corinna

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

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

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

iQIcBAEBCAAGBQJZf513AAoJEPU2Bp2uRE+gzXcP/iXvd7aU6QV9dzONqkRi45bv
r649uKLpIyDg8X55kcPYWh+Ee1AZWyVUSoAdCUnUHZNjs8fbq3zCtMBB5Y1P5B5b
r36H1qll9OdyEN7JVq7pcobH/v5SekCqfFvB7jb3wgzSS/UL88ubf/dXRnGsO1tb
dr1yRJkuJpvwAqvTiiYGBClmvfIoti0iTd9D+6taBG3jl5qRYQ4ZIffU0etgk3kO
LUpdUfqm7amJSFQfjjgm9XNY+Mu6LLCjUuonUHcjH7ignqBjuBHkOIyCzVhL0nYc
bz3mmzEAExAAt/45zOW2wFWmS8rD0tRhwLczxa8iiCRgtJdNk+GKfbTMo3PY3vw6
bmyhrWgCmHtsx4f/q5nIgGawj+F23JocHYuOhdnMv1UjyYjS16216QwbD35yTC1o
9mmeBU4dPa+Mb0eYbcPRrCGJVEaP0Tyad74TAPCkK89EZTqgoi8p79b5rH6+ojvd
l+iek6DG+3RxVXx7e2Tk8lNGMxOh+cveXnFu64bvab22XTrPH0RigA25ImM4g8FV
S3p7eYnDZpvRKdzj3yDG4rHS55ko+Rx9Y6E9z2tvfrWCtZ7MdcGuew8yATu7edwU
TW7YBWgaW7+DwTTgFDi2u7cvlO5IZHd0pxE3t6OFn8fiHdlOFMZcrlEOt+FxrnHr
Z5QtGPC+5uugbq5vMpzJ
=1uFM
-----END PGP SIGNATURE-----

--mJm6k4Vb/yFcL9ZU--

- Raw text -


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