From: guuu@secmail.pro
To: zsh-users@zsh.org
Subject: Pattern matching operations produces incorrect results when MULTIBYTE is not set
Date: Fri, 30 Jun 2017 19:35:01 -0700 [thread overview]
Message-ID: <46dd5cbeb10314f0988c9d8c9c703985.squirrel@giyzk7o6dcunb2ry.onion> (raw)
When MULTIBYTE support turned off, all the indexing and counting of pattern
matching operations becomes wrong.
unsetopt MULTIBYTE; a=abcdef
(N) (length of matching fragment) returns length of source string despite of
fragment found or not:
echo ${(N)a#abc} ${(N)a#qwe}
6 6
(B) and (E) (beginning and end of matching fragment) returns length of source
string +1:
echo ${(SB)a#b} ${(SE)a#b}
7 7
Bug is confirmed on current git master version.
next reply other threads:[~2017-07-01 2:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-01 2:35 guuu [this message]
2017-07-02 17:17 ` 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=46dd5cbeb10314f0988c9d8c9c703985.squirrel@giyzk7o6dcunb2ry.onion \
--to=guuu@secmail.pro \
--cc=zsh-users@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).