public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: [ANNOUNCEMENT] Updated: dash-0.5.8-3
Date: Tue, 31 Jan 2017 13:16:00 -0000	[thread overview]
Message-ID: <20170131131616.GC29504@calimero.vinschen.de> (raw)
In-Reply-To: <20170131100402.GB29504@calimero.vinschen.de>

[-- Attachment #1: Type: text/plain, Size: 2544 bytes --]

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 readline. So
> > > it appears the issue this time is again with cygwin1.dll, or perhaps the Dash
> > > package.
> > 
> > .. uhm, it appears to me that Windows is the issue here.
> > 
> > As those in the know do not feel inclined to respond, I will provide some
> > guesses that are my own:
> > 
> >  - in terms of input buffer management, utf-8 encoded characters will not
> >    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 Fedora)
> >  - 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]
> > 
> > Consequently, dash is only partly useful, even more so on Windows (as it
> > would require an additional "helper" on Windows in order to obtain proper
> > line-editing). Helper? readline, libedit ...
> > 
> > However, I am only guessing ... (only Erik and Corinna can provide expert
> > details here).
> 
> 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.
> 
> 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

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2017-01-31 13:16 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-27 23:40 Eric Blake (cygwin)
2017-01-24 15:58 ` Houder
2017-01-25  1:28   ` Steven Penny
2017-01-25 13:37     ` Houder
2017-01-25 20:31       ` cyg Simple
2017-01-28 14:36         ` Houder
2017-01-26  0:14       ` Steven Penny
2017-01-28 13:44         ` Houder
2017-01-31 10:04           ` Corinna Vinschen
2017-01-31 13:16             ` Corinna Vinschen [this message]
2017-01-31 15:02               ` Houder
2017-01-31 15:33                 ` Corinna Vinschen
2017-01-31 15:42                   ` Eric Blake
2017-02-01  8:46                     ` Houder
2017-01-31 17:54                   ` Houder
2017-02-01  9:17                     ` Corinna Vinschen
2017-02-13 22:03                   ` Thomas Wolff
2017-02-14  8:45                     ` Corinna Vinschen
2017-02-14 19:40                       ` Thomas Wolff
2017-02-14 19:56                         ` Eric Blake
2017-02-14 20:29                           ` Thomas Wolff
2017-02-14 20:35                             ` Thomas Wolff
2017-02-15 22:19                               ` Thomas Wolff
2017-02-16 12:49                                 ` Corinna Vinschen
2017-02-16 20:32                                   ` Thomas Wolff
2017-02-17  7:36                                     ` Thomas Wolff
2017-02-17  9:43                                       ` Corinna Vinschen
2017-02-17 22:30                                         ` Thomas Wolff
2017-02-18 22:46                                           ` Thomas Wolff
2017-02-20  9:11                                             ` Corinna Vinschen
2017-02-20 21:08                                               ` Thomas Wolff
2017-02-20  9:07                                           ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170131131616.GC29504@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).