Emojis not displayed properly #21215

Closed
opened 2026-01-31 07:36:45 +00:00 by claunia · 7 comments
Owner

Originally created by @UsmanTariq2 on GitHub (Feb 7, 2024).

Windows Terminal version

1.18.10301.0

Windows build number

10.0.22631.0

Other Software

No response

Steps to reproduce

Hello everyone , i am trying to input emojis in the terminal and have discovered many weird behaviours

Expected Behavior

When i input an emoji i expect it to be a single character rendered on the screen, however i have to press 2 back keys go back one emoji. This is weird.

Secondly, i am writing a c++ application where i have the following set:

std::setlocale(LC_CTYPE, ".UTF8");
SetConsoleOutputCP(CP_UTF8);
SetConsoleCP(CP_UTF8);

Is there a solution for this? Or is this in the list of todo things. Would be nice to see the correct emojis when entering input.

Actual Behavior

for unicode support. When copy paste a emoji in the terminal, it produces �� instead of the emoji. This is a rendering issue with the terminal as when i resize the terminal in PS mode(forgot to mention that) the emoji is displayed correctly. Secondly, if i go back 1 space(remember emojis are 2 characters) in between the ?? and add a space and then delete that space the emoji is correctly displayed.

Is there a solution for this? Or is this in the list of todo things. Would be nice to see the correct emojis when entering input.

Originally created by @UsmanTariq2 on GitHub (Feb 7, 2024). ### Windows Terminal version 1.18.10301.0 ### Windows build number 10.0.22631.0 ### Other Software _No response_ ### Steps to reproduce Hello everyone , i am trying to input emojis in the terminal and have discovered many weird behaviours ### Expected Behavior When i input an emoji i expect it to be a single character rendered on the screen, however i have to press 2 back keys go back one emoji. This is weird. Secondly, i am writing a c++ application where i have the following set: std::setlocale(LC_CTYPE, ".UTF8"); SetConsoleOutputCP(CP_UTF8); SetConsoleCP(CP_UTF8); Is there a solution for this? Or is this in the list of todo things. Would be nice to see the correct emojis when entering input. ### Actual Behavior for unicode support. When copy paste a emoji in the terminal, it produces �� instead of the emoji. This is a rendering issue with the terminal as when i resize the terminal in PS mode(forgot to mention that) the emoji is displayed correctly. Secondly, if i go back 1 space(remember emojis are 2 characters) in between the ?? and add a space and then delete that space the emoji is correctly displayed. Is there a solution for this? Or is this in the list of todo things. Would be nice to see the correct emojis when entering input.
claunia added the Needs-TriageIssue-BugNeeds-Attention labels 2026-01-31 07:36:45 +00:00
Author
Owner

@lhecker commented on GitHub (Feb 7, 2024):

Can you please try this in Windows Terminal Preview? You can find it in the Store or install the msixbundle here.

@lhecker commented on GitHub (Feb 7, 2024): Can you please try this in Windows Terminal Preview? You can find it in the Store or install the msixbundle [here](https://github.com/microsoft/terminal/releases/tag/v1.20.10303.0).
Author
Owner

@lhecker commented on GitHub (Feb 7, 2024):

Actually, just updating your regular Windows Terminal to 1.19 should also work. You can get the update directly here.

@lhecker commented on GitHub (Feb 7, 2024): Actually, just updating your regular Windows Terminal to 1.19 should also work. You can get the update directly [here](https://github.com/microsoft/terminal/releases/tag/v1.19.10302.0).
Author
Owner

@UsmanTariq2 commented on GitHub (Mar 19, 2024):

Can you please try this in Windows Terminal Preview? You can find it in the Store or install the msixbundle here.

nope same issue with latest release as u said

@UsmanTariq2 commented on GitHub (Mar 19, 2024): > Can you please try this in Windows Terminal Preview? You can find it in the Store or install the msixbundle [here](https://github.com/microsoft/terminal/releases/tag/v1.20.10303.0). nope same issue with latest release as u said
Author
Owner

@lhecker commented on GitHub (Mar 19, 2024):

Can you please post the C++ code here that you're using to test this issue?
Edit: Also, you didn't say whether you're using Preview or not. Can you please tell me your exact version number as well, the one you can find in the About dialog?

@lhecker commented on GitHub (Mar 19, 2024): Can you please post the C++ code here that you're using to test this issue? Edit: Also, you didn't say whether you're using Preview or not. Can you please tell me your exact version number as well, the one you can find in the About dialog?
Author
Owner

@UsmanTariq2 commented on GitHub (Apr 12, 2024):

I did try the preview, the aformentioned issue is still present in it.
I cannot post the c++ code because im not a developer on this

@UsmanTariq2 commented on GitHub (Apr 12, 2024): I did try the preview, the aformentioned issue is still present in it. I cannot post the c++ code because im not a developer on this
Author
Owner

@lhecker commented on GitHub (Apr 17, 2024):

Here's my test code based on your original description:

#include <Windows.h>

#include <iostream>
#include <string>

int main() {
    std::setlocale(LC_CTYPE, ".UTF8");
    SetConsoleOutputCP(CP_UTF8);
    SetConsoleCP(CP_UTF8);

    std::string str;
    std::getline(std::cin, str);
    std::cout << str << std::endl;

    return 0;
}

and it doesn't reproduce in 1.19:
image

I need to ask you to provide a repro, because otherwise I cannot help you solve this issue. 😕

@lhecker commented on GitHub (Apr 17, 2024): Here's my test code based on your original description: ```cpp #include <Windows.h> #include <iostream> #include <string> int main() { std::setlocale(LC_CTYPE, ".UTF8"); SetConsoleOutputCP(CP_UTF8); SetConsoleCP(CP_UTF8); std::string str; std::getline(std::cin, str); std::cout << str << std::endl; return 0; } ``` and it doesn't reproduce in 1.19: ![image](https://github.com/microsoft/terminal/assets/2256941/25a4926c-f27d-42c9-b011-58c0da45c5ab) I need to ask you to provide a repro, because otherwise I cannot help you solve this issue. 😕
Author
Owner

@UsmanTariq2 commented on GitHub (May 11, 2024):

Ah ok will check

@UsmanTariq2 commented on GitHub (May 11, 2024): Ah ok will check
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21215