summaryrefslogtreecommitdiff
path: root/cmd-line-utils/libedit/refresh.c
diff options
context:
space:
mode:
authorunknown <bar@mysql.com/bar.myoffice.izhnet.ru>2008-03-04 16:13:08 +0400
committerunknown <bar@mysql.com/bar.myoffice.izhnet.ru>2008-03-04 16:13:08 +0400
commit8e4a3fcbc996e41b4d805a926479bfacf13a99dd (patch)
tree22b470d8b1c6d8408233c658f3bb0ed75048b48b /cmd-line-utils/libedit/refresh.c
parent197b41196dcf861db87dac40996bec5ecf191b95 (diff)
downloadmariadb-git-8e4a3fcbc996e41b4d805a926479bfacf13a99dd.tar.gz
Bug#23097 mysql can't insert korean on mysql prompt.
Problem: libedit is a very pure-ASCII oriented library, and it is not aware of extended (0x80..0xFF) or even multi-byte characters. It considered such characters as non-printable and didn't allow to input them. Fix: make libedit think that all bytes >= 0x80 are printable. cmd-line-utils/libedit/el.h: Defining macro, a locale's isprint() replacement. We'll consider all 8bit values as printable characters. cmd-line-utils/libedit/key.c: Changing isprint() to el_isprint(). cmd-line-utils/libedit/map.c: Changing isprint() to el_isprint(). cmd-line-utils/libedit/read.c: Changing isprint() to el_isprint(). cmd-line-utils/libedit/refresh.c: Changing isprint() to el_isprint().
Diffstat (limited to 'cmd-line-utils/libedit/refresh.c')
-rw-r--r--cmd-line-utils/libedit/refresh.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd-line-utils/libedit/refresh.c b/cmd-line-utils/libedit/refresh.c
index b2833d215c5..46aca15ef08 100644
--- a/cmd-line-utils/libedit/refresh.c
+++ b/cmd-line-utils/libedit/refresh.c
@@ -88,7 +88,7 @@ private void
re_addc(EditLine *el, int c)
{
- if (isprint(c)) {
+ if (el_isprint(c)) {
re_putc(el, c, 1);
return;
}
@@ -964,7 +964,7 @@ re_refresh_cursor(EditLine *el)
h = 1;
v++;
}
- } else if (!isprint((unsigned char) c)) {
+ } else if (!el_isprint((unsigned char) c)) {
h += 3;
if (h > th) { /* if overflow, compensate */
h = h - th;
@@ -1057,7 +1057,7 @@ re_fastaddc(EditLine *el)
char mc = (c == '\177') ? '?' : (c | 0100);
re_fastputc(el, '^');
re_fastputc(el, mc);
- } else if (isprint((unsigned char) c)) { /* normal char */
+ } else if (el_isprint((unsigned char) c)) { /* normal char */
re_fastputc(el, c);
} else {
re_fastputc(el, '\\');