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

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=xdjulJl/10quIq5E8Yiaws/oHmF3NNx0Wma30nxw79CYdxBfUtLqz
yDvkos8uX2kcEECCwm2j6ZT3bOBCLwMgDwGhFGX1+gcetzij+esoxjPGOlJiuSao
OV0MX2a8S73Jwf+JFrdV/M9eOGfys0+u/5VmT+3cwloKkkISsqT3/A=
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=g0o9Zni9/FAZ+ohy7ZsfVmtpFrw=; b=gKEPkQ7IhaF885jB6CZebUqm3OVk
gv6XBH1GPAnwPb4FLb/+WGopiGU1VgqQMHBT7bX4gzafUlsNSuLEGEpUOtNfbo0k
OSRnalVGjhSGAnH4YzcbnvmRuKtwkxPWMWTYuNdtTfxJ/jdK7OBB53Qf+WBjYFbZ
QEgT2VvnHJEhs4E=
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=-100.2 required=5.0 tests=AWL,BAYES_40,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=finger, findings, stevens, Stevens
X-HELO: drew.franken.de
Date: Mon, 31 Jul 2017 22:01:46 +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: <20170731200146.GD18950@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>
MIME-Version: 1.0
In-Reply-To: <477581a5-7e4a-2bb2-99c6-80a751f5a691@gmail.com>
User-Agent: Mutt/1.8.3 (2017-05-23)

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

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).
>=20
> - CYGWIN_NT-6.3 computername 2.8.0(0.309/5/3) 2017-04-01 20:47 x86_64 Cyg=
win
> - CYGWIN_NT-6.3 computername 2.8.2(0.313/5/3) 2017-07-12 10:58 x86_64 Cyg=
win
>=20
> > > - Alt 148 outputs nothing
> > > - Alt 0246 outputs nothing
> > > - Pasting this character does not work
>=20
> I ran Cygwin from a clean command window (`cmd /d`) using `chcp ...`
> and `bin\bash -li`.  The =C3=B6's don't appear in bash with CP 65001. Oth=
er
> combinations (bash with CP 437, cmd with either CP) allow =C3=B6's to
> appear.

Sidenote:

  If I start just `bash' directly from a cmd window I get weird output
  like

    (arg: 6)

  after lifting my finger from the ALT key.  I can not reproduce it=20
  starting bash as login shell via `bash -l' from cmd or by running
  Cygwin.bat.  Or, FWIW, when running bash from tcsh.

  I wonder if that's some missing readline initialization but I'm far from
  a bash/readline expert.

Now, Windows 7.

Sidenote:

  On W7 the raster font can get you into trouble.  The Window function
  WriteConsoleW fails with error 31, ERROR_GEN_FAILURE, when trying to
  output the '=C3=B6' character while the codepage is set to 65001.  That
  doesn't happen on W10, nor on W7 using Consolas or Lucida fonts.

Further debugging shows that Alt-Numpad doesn't work on Windows 7
because the OS doesn't return the required information.

Huh?  Why then does it look like only bash is affected?

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.

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.

As far as I can see there's no way around this, unless readline
stops using select and just reads the input as it comes along.
I'm just not sure this is worth it.

> Try the legacy console (conhost v1), if you haven't already.  Maybe it
> will show the same behavior even on Windows 10.

I'm using the Windows console by starting "cmd".  I don't know if
there's another console version available or how to start it.


Corinna

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

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

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

iQIcBAEBCAAGBQJZf4yqAAoJEPU2Bp2uRE+gXEcP/1lji4YKUwT/+EoNppKMIdOO
KaBBs0HIhrR+eWnvpdMu8kRog5bgzLny4HNgTOcznxvoGtvVGTUYk7Z+w0O4WwOG
IhIRhUzpAKpVSJNDILHKuYN9aaSxv3CFK5omMTM1oRFSrswf1zNk7zrrNdLddMJB
11ClkYQ1eyiZ+3uUVP2aahZlUZVebBUFOIf28mLYEI43JttLj8vT+yg+xDfkrk/z
zeYWZl7pn6xjZi+o+wbCn1w60/w7PTsgShKz+dmqQc/l+ggf/qMKom9Bstz/0OjF
qvBT8y6aDBwxKpJEg3o7ISND+1g8UJ1uGImY6z+m3WLT9GxVrIzCjEAR8SAsSKrx
0ayUPjiPwusFlfSMdRZqfDYXIt7BBSH8cN04u7uivD9fKgzaQCn9Y4SXMtTOLxt+
K8YyXlLH9mHs0JbxplMy/TCe3FZx/MDR/ZiVd6NNJyCGDeJnSXwR3zy1/nGjEVJm
I83hSKVpDBtkno1HBKRm0tg7/mpdkihY3egAxjgkW5Ek46oHGmbtFl3q8CoV88rY
Ouc3e4c5ibNLEAV7+UvYsuQAmUewyboldOZALKRNMoYh9ZmSr5LtPYFnqaypLcKp
l0tVQcnWaxrxsyP3Bm4GgLqMrvtnTNG1NBxBtf2+ok4/xObXXV7Wa8Bxa2YKSNJa
I8jv5fZq1h31yxA+7zkr
=xEx6
-----END PGP SIGNATURE-----

--ZGiS0Q5IWpPtfppv--

- Raw text -


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