This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ANNOUNCEMENT] Updated: dash-0.5.8-3


On Tue, 31 Jan 2017 14:16:16, Corinna Vinschen wrote:

[snip]

> > 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.

(Thank you for responding -- and your effort thus far).

Agreed. One byte or more, depending on the "character" ... (which is
not a problem in case of UTF-8 encoding -- continuation bit).

Of course, the terminal driver must receive the characters encoded in
UTF-8.

Therefore the question is: 'can the same situation be created under
under Windows?' (does Windows provide the required support?)

A second question is: 'is it worth the effort?' Given that bash can
recognize UTF-8 (using readline) ...

.. and the fact that dash does not support multi-byte characters.

Regards,

Henri

=====


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]