shell: fix shell chinese error
This commit is contained in:
parent
c234adbb85
commit
fed3b36b0e
|
@ -416,6 +416,9 @@ char taosGetConsoleChar() {
|
||||||
bufIndex = 0;
|
bufIndex = 0;
|
||||||
}
|
}
|
||||||
if (mbStrLen == 0){
|
if (mbStrLen == 0){
|
||||||
|
if (buf[bufIndex] == '\r') {
|
||||||
|
bufIndex++;
|
||||||
|
}
|
||||||
mbStrLen = WideCharToMultiByte(CP_UTF8, 0, &buf[bufIndex], 1, mbStr, sizeof(mbStr), NULL, NULL);
|
mbStrLen = WideCharToMultiByte(CP_UTF8, 0, &buf[bufIndex], 1, mbStr, sizeof(mbStr), NULL, NULL);
|
||||||
mbStrIndex = 0;
|
mbStrIndex = 0;
|
||||||
bufIndex++;
|
bufIndex++;
|
||||||
|
@ -485,7 +488,6 @@ int32_t shellReadCommand(char *command) {
|
||||||
shellBackspaceChar(&cmd);
|
shellBackspaceChar(&cmd);
|
||||||
break;
|
break;
|
||||||
case '\n':
|
case '\n':
|
||||||
break;
|
|
||||||
case '\r':
|
case '\r':
|
||||||
#ifdef WINDOWS
|
#ifdef WINDOWS
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in New Issue