mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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().
This commit is contained in:
@ -618,7 +618,7 @@ key__decode_char(char *buf, int cnt, int ch)
|
||||
} else if (ch == '\\') {
|
||||
buf[cnt++] = '\\';
|
||||
buf[cnt] = '\\';
|
||||
} else if (ch == ' ' || (isprint(ch) && !isspace(ch))) {
|
||||
} else if (ch == ' ' || (el_isprint(ch) && !isspace(ch))) {
|
||||
buf[cnt] = ch;
|
||||
} else {
|
||||
buf[cnt++] = '\\';
|
||||
@ -660,7 +660,7 @@ key__decode_str(const char *str, char *buf, const char *sep)
|
||||
} else if (*p == '^' || *p == '\\') {
|
||||
*b++ = '\\';
|
||||
*b++ = *p;
|
||||
} else if (*p == ' ' || (isprint((unsigned char) *p) &&
|
||||
} else if (*p == ' ' || (el_isprint((unsigned char) *p) &&
|
||||
!isspace((unsigned char) *p))) {
|
||||
*b++ = *p;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user