From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6960 invoked by alias); 6 Dec 2015 17:13:46 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 37329 Received: (qmail 19177 invoked from network); 6 Dec 2015 17:13:44 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-Originating-IP: [86.6.158.222] X-Spam: 0 X-Authority: v=2.1 cv=YMdiskyx c=1 sm=1 tr=0 a=2SBOh4l1h08DI0L+aujZyQ==:117 a=2SBOh4l1h08DI0L+aujZyQ==:17 a=NLZqzBF-AAAA:8 a=kj9zAlcOel0A:10 a=z2w4gCE7LNQyYzwGvOkA:9 a=CjuIK1q_8ugA:10 Date: Sun, 6 Dec 2015 17:13:40 +0000 From: Peter Stephenson To: Sebastian Gniazdowski Cc: Zsh hackers list Subject: Re: num_in_chars incremented after each mbrtowc() Message-ID: <20151206171340.1d2606b0@ntlworld.com> In-Reply-To: References: <20151206154956.104b10c6@ntlworld.com> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.28; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sorry, I'm still not following; it still seems to indicate you don't understand the function (which could well be my fault, which is why I've improved the documentation). Consequently, as I asked, what I need to know is what output you expect from the function under what circumstances. (I do not need a patch and the following is without reference to the innards of the function.) Under what circumstances is what you are getting wrong? You imply it is to do with invalid characters (of some sort). What (this is the key question) do you expect to be returned for invalid characters? Preferably with an example (text not video). Also, is your issue restricted to the question of width, or does it also apply to when the function is returning a charater count (I'm guessing it's just widths?) E.g.: I pass in the arguments ... for the function and I expect this to cause return ... so that the final output looks like ... (What you say would be consistent, for example, with the fact that you expect 2 to be returned for an octet from an invalid character because the shell or something else happens to display the ones you've got as 2 characters. That's certainly not designed into the function at the moment and if that's what you want it's going to take a lot more work because the width of display of invalid characters in the line editor isn't fixed. However, I'm not sure that the display you're talking about is even in the line editor at all --- which means we're out of luck because there is no fixed way of displaying invalid characters. But I don't yet know this is the issue you're talking about.) Thanks pws