about summary refs log tree commit diff
path: root/Src/utils.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2006-06-30 09:41:34 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2006-06-30 09:41:34 +0000
commit4cd7b957f382c1d961641629a84ada8384953598 (patch)
tree953744b3c8ffd0e1da315b8bf10f044f1f6a0a7b /Src/utils.c
parent92737d2c42f8df17ce910a2ca04fd09b84a5b6a3 (diff)
downloadzsh-4cd7b957f382c1d961641629a84ada8384953598.tar.gz
zsh-4cd7b957f382c1d961641629a84ada8384953598.tar.xz
zsh-4cd7b957f382c1d961641629a84ada8384953598.zip
22529: multibyte conversion in math expressions
Diffstat (limited to 'Src/utils.c')
-rw-r--r--Src/utils.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/Src/utils.c b/Src/utils.c
index 32f6ae336..75a736596 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -4410,6 +4410,17 @@ getkeystring(char *s, int *len, int fromwhere, int *misc)
 		   (fromwhere == 2 || fromwhere == 5 || fromwhere == 6)) {
 	    control = 1;
 	    continue;
+#ifdef MULTIBYTE_SUPPORT
+	} else if (fromwhere == 6 && isset(MULTIBYTE) && STOUC(*s) > 127) {
+	    wint_t wc;
+	    int len;
+	    len = mb_metacharlenconv(s, &wc);
+	    if (wc != WEOF) {
+		*misc = (int)wc;
+		return s + len;
+	    }
+#endif
+
 	} else if (*s == Meta)
 	    *t++ = *++s ^ 32;
 	else