zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: Sebastian Gniazdowski <sgniazdowski@gmail.com>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: num_in_chars incremented after each mbrtowc()
Date: Sun, 6 Dec 2015 17:13:40 +0000	[thread overview]
Message-ID: <20151206171340.1d2606b0@ntlworld.com> (raw)
In-Reply-To: <CAKc7PVAHjSD61c__0S_LzLc6YqCLJwtqEAgw8DfQkNMP7r6YYg@mail.gmail.com>

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


  reply	other threads:[~2015-12-06 17:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-06  9:37 Sebastian Gniazdowski
2015-12-06 10:24 ` Sebastian Gniazdowski
2015-12-06 15:49 ` Peter Stephenson
2015-12-06 16:40   ` Sebastian Gniazdowski
2015-12-06 17:13     ` Peter Stephenson [this message]
2015-12-06 17:03   ` Sebastian Gniazdowski
2015-12-06 17:33     ` Peter Stephenson
2015-12-06 17:40       ` Peter Stephenson

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=20151206171340.1d2606b0@ntlworld.com \
    --to=p.w.stephenson@ntlworld.com \
    --cc=sgniazdowski@gmail.com \
    --cc=zsh-workers@zsh.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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 NNTP newsgroup(s).