50668: treat 8bit chars correctly when multibyte is unset

The problem was found in character range, but may have existed in other
occasions
master
Jun-ichi Takimoto 2 years ago
parent 1e4c7bcae5
commit 33938ad489

@ -1,3 +1,8 @@
2022-09-27 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
* 50668: Src/utils.c, Test/D09brace.ztst: treat 8bit characters
in charcter range correctly when multibyte is unset
2022-09-26 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
* 50662: Test/ztst.zsh: unset LC_* for all the tests

@ -5519,7 +5519,7 @@ mb_metacharlenconv(const char *s, wint_t *wcp)
if (!isset(MULTIBYTE) || STOUC(*s) <= 0x7f) {
/* treat as single byte, possibly metafied */
if (wcp)
*wcp = (wint_t)(*s == Meta ? s[1] ^ 32 : *s);
*wcp = (wint_t)STOUC(*s == Meta ? s[1] ^ 32 : *s);
return 1 + (*s == Meta);
}
/*

@ -116,3 +116,10 @@
print -r {1..10}{..
0:Unmatched braces after matched braces are left alone.
>1{.. 2{.. 3{.. 4{.. 5{.. 6{.. 7{.. 8{.. 9{.. 10{..
() {
setopt localoptions no_multibyte
echo -E {$'\x80'..$'\x81'}
}
0:range of 8bit chars, multibyte option unset
>\M-^@ \M-^A

Loading…
Cancel
Save