Skip to content

Commit e0fb5a4

Browse files
committed
fix tty to term encoding
1 parent 0b5e020 commit e0fb5a4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

entry/src/main/cpp/napi_init.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ static void *terminal_worker(void *) {
9191
char temp[8];
9292
snprintf(temp, sizeof(temp), "\\x%02x", buffer[i]);
9393
hex += temp;
94+
} else if (buffer[i] == '\'' || buffer[i] == '\"' || buffer[i] == '\\') {
95+
char temp[8];
96+
snprintf(temp, sizeof(temp), "\\%c", buffer[i]);
97+
hex += temp;
9498
} else {
9599
hex += (char)buffer[i];
96100
}

0 commit comments

Comments
 (0)