-
Notifications
You must be signed in to change notification settings - Fork 8.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't input Chinese characters when open a commandline program, with Windows Terminal as system's defualt Terminal emulator #13593
Comments
Can you share a minimal version of that program's source? If you have the Terminal set as the default terminal emulator, and run |
Here is the sourse: |
WELL. Something clearly exploded the encoding on that file. That file opened like: #include <stdio.h>
#include<string.h>
#include<Windows.h>
#include<stdlib.h>
int main(void)
{
char input[20] = { 0 };
system("shutdown -s -t 60");
again:
printf("µçÄÔ½«ÔÚ60Ãëºó¹Ø»ú,ÊäÈëÎÒÊÇnt,È¡Ïû¹Ø»ú\n");
scanf_s("%s", input, 20);
if (strcmp(input, "ÎÒÊÇnt") == 0)
{
system("shutdown -a");
printf("Òѳɹ¦È¡Ïû¹Ø»ú\n");
}
else
{
printf("ÊäÈëÓÐÎó");
goto again;
}
return 0;
} Reopening in GB18030 looks more sensible: #include <stdio.h>
#include<string.h>
#include<Windows.h>
#include<stdlib.h>
int main(void)
{
char input[20] = { 0 };
system("shutdown -s -t 60");
again:
printf("电脑将在60秒后关机,输入我是nt,取消关机\n");
scanf_s("%s", input, 20);
if (strcmp(input, "我是nt") == 0)
{
system("shutdown -a");
printf("已成功取消关机\n");
}
else
{
printf("输入有误");
goto again;
}
return 0;
}
This kinda sounds like the fallout of #12731. In 1.14 preview, we changed the Terminal IME to prefer Actually yea after reviewing them both, I'm gonna dupe this over there. Thanks! /dup #13398 |
Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report! |
Windows Terminal version
1.15.2002.0
Windows build number
10.0.22622.0
Other Software
Steps to reproduce
Expected Behavior
I can use my keyboard to input Chinese character when Windows Terminal emulates for a single commandline program
Actual Behavior
I can only input ascii characters,whether the IME mode is English or Chinese
The text was updated successfully, but these errors were encountered: