mirror of
https://git.code.sf.net/p/zsh/code
synced 2026-04-18 06:53:35 -04:00
50668: treat 8bit chars correctly when multibyte is unset
The problem was found in character range, but may have existed in other occasions
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user