[WSL]: Chinese input can't be deleted as expected. #21074

Open
opened 2026-01-31 07:32:24 +00:00 by claunia · 0 comments
Owner

Originally created by @foldl on GitHub (Jan 8, 2024).

Windows Terminal version

1.18.3181.0

Windows build number

10.0.22635.2921

Other Software

WSL.

Steps to reproduce

  1. Build this simple C++ program (bug.cpp) with g++ bug.cpp:

    #include <string>
    #include <iostream>
    int main(int argc, const char **argv)
    {
        std::string s;
        std::cin >> s;
        std::cout << s << std::endl;
        return 0;
    }
    
  2. Run it with ./a.out, input some Chinese characters, such as "时间",
    and we see that this string is eched correctly.

  3. Run it again, input "时间", then use Backspace to delete one or two characters, we can see GUI's behaviour is wrong.

    As shown in the image, I have presse Backspace several times, but "时" is always there. Then I typed in "世界"
    and 3 characters ("时世界") is displayed. Press Enter, we see that "世界" is echoed correctly.

image

Expected Behavior

Chinese input can be deleted as expected.

Actual Behavior

Some Chinese characters are displayed even through they are already deleted.

Originally created by @foldl on GitHub (Jan 8, 2024). ### Windows Terminal version 1.18.3181.0 ### Windows build number 10.0.22635.2921 ### Other Software WSL. ### Steps to reproduce 1. Build this simple C++ program (bug.cpp) with `g++ bug.cpp`: ```c++ #include <string> #include <iostream> int main(int argc, const char **argv) { std::string s; std::cin >> s; std::cout << s << std::endl; return 0; } ``` 1. Run it with `./a.out`, input some Chinese characters, such as "时间", and we see that this string is eched correctly. 1. Run it again, input "时间", then use Backspace to delete one or two characters, we can see GUI's behaviour is wrong. As shown in the image, I have presse Backspace several times, but "时" is always there. Then I typed in "世界" and 3 characters ("时世界") is displayed. Press Enter, we see that "世界" is echoed correctly. ![image](https://github.com/microsoft/terminal/assets/4046440/8c15f742-bbe8-4cf3-a0ad-5ede76973722) ### Expected Behavior Chinese input can be deleted as expected. ### Actual Behavior Some Chinese characters are displayed even through they are already deleted.
claunia added the Needs-TriageIssue-BugNeeds-Attention labels 2026-01-31 07:32:24 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21074