mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +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.
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