zsh-users
 help / color / mirror / code / Atom feed
* Pattern matching operations produces incorrect results when MULTIBYTE is not set
@ 2017-07-01  2:35 guuu
  2017-07-02 17:17 ` Peter Stephenson
  0 siblings, 1 reply; 2+ messages in thread
From: guuu @ 2017-07-01  2:35 UTC (permalink / raw)
  To: zsh-users

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.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-07-02 17:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-01  2:35 Pattern matching operations produces incorrect results when MULTIBYTE is not set guuu
2017-07-02 17:17 ` Peter Stephenson

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).