Emojis are not deleted or displayed properly #19784

Closed
opened 2026-01-31 06:53:30 +00:00 by claunia · 2 comments
Owner

Originally created by @pascal754 on GitHub (Apr 29, 2023).

Windows Terminal version

1.16.10262.0

Windows build number

10.0.22621.0

Other Software

PowerShell 7.3.4

MSYS2 MSYS_NT-10.0-22621 (installed from https://www.msys2.org/)

Steps to reproduce

Copy an emoji and paste it in PowerShell, Command Prompt, or MSYS2 tab in Windows Terminal.

Erase it using the backspace or delete key.

Move the cursor using the left and right arrow keys.

Expected Behavior

It is natural to delete an emoji as one character unit with one backspace or one delete keystroke.

Actual Behavior

  1. An emoji was copy-pasted in power shell and it requires two backspace or delete keystrokes to erase an emoji. For example, to delete 😺 (U+1F63A) when a backspace key is pressed it changes to replacement character (U+FFFD) and another backspace keystroke is needed to delete this character. The same behavior is observed when using the delete key. In addition, when left and right arrow keys are pressed to move the cursor(vertical bar or pipe), it moves halfway through the emoji. An emoji should be handled as one character.

emoji_ps

  1. When emojis were copy-pasted in command prompt they are broken and displayed two replacement character pairs. When the cursor is moved in front of the first replacement character of any pairs and for example a space is inserted then the whole emojis are displayed properly.

emoji_command_prompt

  1. When emojis were copy-pasted in MSYS2 tab (installed from https://www.msys2.org/), one backspace keystroke deletes the whole sequence of emojis but it requires two delete keystrokes to erase one emoji. However, this time an emoji changes to white square (U+25A1). Similarly, the left arrow key moves the cursor in front of the series of emojis but the right arrow key moves halfway through an emoji. When alphabets and emojis are mixed, for example aa😺😺😺, one backspace keystroke deletes one alphabet plus the series of emojis; aa😺😺😺 becomes a.
Originally created by @pascal754 on GitHub (Apr 29, 2023). ### Windows Terminal version 1.16.10262.0 ### Windows build number 10.0.22621.0 ### Other Software PowerShell 7.3.4 MSYS2 MSYS_NT-10.0-22621 (installed from https://www.msys2.org/) ### Steps to reproduce Copy an emoji and paste it in PowerShell, Command Prompt, or MSYS2 tab in Windows Terminal. Erase it using the backspace or delete key. Move the cursor using the left and right arrow keys. ### Expected Behavior It is natural to delete an emoji as one character unit with one backspace or one delete keystroke. ### Actual Behavior 1. An emoji was copy-pasted in power shell and it requires two backspace or delete keystrokes to erase an emoji. For example, to delete 😺 (U+1F63A) when a backspace key is pressed it changes to replacement character (U+FFFD) and another backspace keystroke is needed to delete this character. The same behavior is observed when using the delete key. In addition, when left and right arrow keys are pressed to move the cursor(vertical bar or pipe), it moves halfway through the emoji. An emoji should be handled as one character. ![emoji_ps](https://user-images.githubusercontent.com/45612663/235298293-2711b989-bf9d-46df-95d0-c979c614bcd8.png) 2. When emojis were copy-pasted in command prompt they are broken and displayed two replacement character pairs. When the cursor is moved in front of the first replacement character of any pairs and for example a space is inserted then the whole emojis are displayed properly. ![emoji_command_prompt](https://user-images.githubusercontent.com/45612663/235298299-4a480ea3-9d4b-4e66-8ac9-6d6ae8e03e21.png) 3. When emojis were copy-pasted in MSYS2 tab (installed from https://www.msys2.org/), one backspace keystroke deletes the whole sequence of emojis but it requires two delete keystrokes to erase one emoji. However, this time an emoji changes to white square (U+25A1). Similarly, the left arrow key moves the cursor in front of the series of emojis but the right arrow key moves halfway through an emoji. When alphabets and emojis are mixed, for example `aa😺😺😺`, one backspace keystroke deletes one alphabet plus the series of emojis; `aa😺😺😺` becomes `a`.
claunia added the Issue-BugResolution-Duplicate labels 2026-01-31 06:53:31 +00:00
Author
Owner

@zadjii-msft commented on GitHub (May 1, 2023):

This is more or less tracked in /dup #1503, or more broadly, #190.

PSReadline might have a more specific issue on their side for tracking how emoji are handled on their side.

Thanks!

@zadjii-msft commented on GitHub (May 1, 2023): This is more or less tracked in /dup #1503, or more broadly, #190. PSReadline might have a more specific issue on their side for tracking how emoji are handled on their side. Thanks!
Author
Owner

@microsoft-github-policy-service[bot] commented on GitHub (May 1, 2023):

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!

@microsoft-github-policy-service[bot] commented on GitHub (May 1, 2023): 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!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#19784