From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: PATCH: read full multibyte string a bit more sooner
Date: Sat, 12 Sep 2015 11:02:14 -0700 [thread overview]
Message-ID: <150912110214.ZM11964@torch.brasslantern.com> (raw)
In-Reply-To: <CAH+w=7YCYM2rhYL3NecAHc22XR5Tnb7JzE7tL_VaeOcqm0uMeA@mail.gmail.com>
On Sep 12, 9:46am, Bart Schaefer wrote:
}
} I then switched back to zsh-5.1.1-dev-0 and tried to repeat this.
}
} The very first time I pasted the test string, I got this: [...]
}
} As you can see this is ALMOST correct, except for that unexpected
} trailing tilde
So one more tidbit: I reverted back to the 5.1 version of the
bracketed-paste-magic source with the 5.1.1-dev-0 binary and tried
this again, and with the mbchar+= loop removed (so relying solely
on read-command to read multiple bytes properly), I NEVER get a
correct result, even on first paste -- I always get the <ffffffff>
garbage.
Which means that read-command is still returning something that
matches [[:INCOMPLETE:]]* on that very first call, which ought to
be impossible as I understand it. And indeed, if I step across
getrestchar() with a debugger, it's failing on any character that
is more than two bytes wide (returning only the first two bytes),
which probably leaves mbrtowc() in an indeterminate state. (This
is reading from the "zle -U" buffer so key timeout does not matter.)
Is it possible this is happening because my environment LC_CTYPE
is not set, even though I have LANG=en_US.UTF-8 ?
next prev parent reply other threads:[~2015-09-12 18:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-11 20:29 Peter Stephenson
2015-09-11 22:42 ` Bart Schaefer
2015-09-12 9:57 ` Peter Stephenson
2015-09-12 16:46 ` Bart Schaefer
2015-09-12 17:56 ` Peter Stephenson
2015-09-12 18:02 ` Bart Schaefer [this message]
2015-09-12 19:41 Peter Stephenson
2015-09-12 19:49 ` Bart Schaefer
2015-09-12 20:07 Peter Stephenson
2015-09-12 20:35 ` Bart Schaefer
2015-09-12 23:09 ` Bart Schaefer
2015-09-19 19:25 ` Peter Stephenson
2015-09-19 20:49 ` Bart Schaefer
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=150912110214.ZM11964@torch.brasslantern.com \
--to=schaefer@brasslantern.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).