From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 58997 invoked by alias); 31 Jan 2017 15:02:03 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 57651 invoked by uid 89); 31 Jan 2017 15:02:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1645, H*F:D*nl X-HELO: lb3-smtp-cloud2.xs4all.net Received: from lb3-smtp-cloud2.xs4all.net (HELO lb3-smtp-cloud2.xs4all.net) (194.109.24.29) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 31 Jan 2017 15:01:57 +0000 Received: from tmp.aKV8StgJAT ([83.162.234.136]) by smtp-cloud2.xs4all.net with ESMTP id f31u1u0052xEdKF0131vlu; Tue, 31 Jan 2017 16:01:55 +0100 Date: Tue, 31 Jan 2017 15:02:00 -0000 Message-ID: <40c92f1e987a9162742766816abb4a03@smtp-cloud2.xs4all.net> From: Houder To: cygwin@cygwin.com Subject: Re: [ANNOUNCEMENT] Updated: dash-0.5.8-3 References: <58893f48.0850ca0a.6c5d.5fde@mx.google.com> <81b5af354b7a3925ff0a68dcc063265f@smtp-cloud6.xs4all.net> <20170131100402.GB29504@calimero.vinschen.de> <20170131131616.GC29504@calimero.vinschen.de> In-Reply-to: <20170131131616.GC29504@calimero.vinschen.de> User-Agent: mua.awk 0.99 X-SW-Source: 2017-01/txt/msg00403.txt.bz2 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