Pasting a single certain Unicode character results in two garbage characters being pasted instead #13526

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

Originally created by @snaar on GitHub (Apr 17, 2021).

Windows Terminal version (or Windows build number)

10.0.18363.1440, 1.7.1033.0

Other Software

N/A

Steps to reproduce

  1. Copy some "high" unicode character into buffer, for example U+1FB37 '🬷'. You can also copy it from https://www.fileformat.info/info/unicode/char/1fb37/browsertest.htm
  2. Paste it into terminal.
  3. Optionally paste it into notepad for comparison.

Expected Behavior

Expected actual character. Or if font doesn't support it - single box character.

Actual Behavior

After pasting terminal shows two box characters:
image

If you paste same thing into notepad it shows up correctly:
image

Incidentally, if you paste it into old cmd.exe, it shows up as box, but still only a single box:
image

It's possible it's related to https://github.com/microsoft/terminal/issues/9308

Originally created by @snaar on GitHub (Apr 17, 2021). ### Windows Terminal version (or Windows build number) 10.0.18363.1440, 1.7.1033.0 ### Other Software N/A ### Steps to reproduce 1. Copy some "high" unicode character into buffer, for example U+1FB37 '🬷'. You can also copy it from https://www.fileformat.info/info/unicode/char/1fb37/browsertest.htm 2. Paste it into terminal. 3. Optionally paste it into notepad for comparison. ### Expected Behavior Expected actual character. Or if font doesn't support it - single box character. ### Actual Behavior After pasting terminal shows two box characters: ![image](https://user-images.githubusercontent.com/602439/115125788-74e5e180-9f98-11eb-8429-bcedf1ca83cb.png) If you paste same thing into notepad it shows up correctly: ![image](https://user-images.githubusercontent.com/602439/115125798-8dee9280-9f98-11eb-9e9f-1a008472865f.png) Incidentally, if you paste it into old cmd.exe, it shows up as box, but still only a single box: ![image](https://user-images.githubusercontent.com/602439/115125824-b70f2300-9f98-11eb-8b2b-aed606828190.png) It's possible it's related to https://github.com/microsoft/terminal/issues/9308
claunia added the Area-InputResolution-Duplicate labels 2026-01-31 03:45:00 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Apr 19, 2021):

I think this is actually more broadly #190 and #1472. cmd.exe and Windows Powershell are notoriously bad at handling unicode characters.

Er, after reading more carefully, this might even be #9052

@zadjii-msft commented on GitHub (Apr 19, 2021): I think this is actually more broadly #190 and #1472. cmd.exe and Windows Powershell are notoriously bad at handling unicode characters. Er, after reading _more_ carefully, this might even be #9052
Author
Owner

@sba923 commented on GitHub (May 5, 2021):

That's really annoying when pasting file/folder paths copied from File Explorer.

Every day I face paths like:

C:\Users\<REDACTED>\<REDACTED>\Innovation Labs – Projects - Documents
          Offset Bytes                                           Ascii
                 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
          ------ ----------------------------------------------- -----
0000000000000000 43 3A 5C 55 73 65 72 73 5C 3C 52 45 44 41 43 54 C:\Users\<REDACT
0000000000000010 45 44 3E 5C 3C 52 45 44 41 43 54 45 44 3E 5C 49 ED>\<REDACTED>\I
0000000000000020 6E 6E 6F 76 61 74 69 6F 6E 20 4C 61 62 73 20 E2 nnovation Labs â
0000000000000030 80 93 20 50 72 6F 6A 65 63 74 73 20 2D 20 44 6F �� Projects - Do
0000000000000040 63 75 6D 65 6E 74 73                            cuments

and I can't paste them into PowerShell commands running within Windows Terminal.

@sba923 commented on GitHub (May 5, 2021): That's really annoying when pasting file/folder paths copied from File Explorer. Every day I face paths like: ```none C:\Users\<REDACTED>\<REDACTED>\Innovation Labs – Projects - Documents ``` ```none Offset Bytes Ascii 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F ------ ----------------------------------------------- ----- 0000000000000000 43 3A 5C 55 73 65 72 73 5C 3C 52 45 44 41 43 54 C:\Users\<REDACT 0000000000000010 45 44 3E 5C 3C 52 45 44 41 43 54 45 44 3E 5C 49 ED>\<REDACTED>\I 0000000000000020 6E 6E 6F 76 61 74 69 6F 6E 20 4C 61 62 73 20 E2 nnovation Labs â 0000000000000030 80 93 20 50 72 6F 6A 65 63 74 73 20 2D 20 44 6F �� Projects - Do 0000000000000040 63 75 6D 65 6E 74 73 cuments ``` and I can't paste them into PowerShell commands running within Windows Terminal.
Author
Owner

@zadjii-msft commented on GitHub (Feb 23, 2022):

Is this still an issue? If my theory was right that this was #9052, that was fixed in 66b9b9d6f1 which shipped in v1.9.1445.0, back in late May 2021.

@zadjii-msft commented on GitHub (Feb 23, 2022): Is this still an issue? If my theory was right that this was #9052, that was fixed in 66b9b9d6f1b600d1b25aa2339fa368113c45952b which shipped in [v1.9.1445.0](https://github.com/microsoft/terminal/releases/tag/v1.9.1445.0), back in late May 2021.
Author
Owner

@snaar commented on GitHub (Feb 23, 2022):

Still reproduceable in 1.11.3471.0.

@snaar commented on GitHub (Feb 23, 2022): Still reproduceable in 1.11.3471.0.
Author
Owner

@snaar commented on GitHub (Feb 23, 2022):

Actually it looks like there is regression in cmd.exe now too - it shows two box characters now instead of one like it used too:
image

@snaar commented on GitHub (Feb 23, 2022): Actually it looks like there is regression in cmd.exe now too - it shows two box characters now instead of one like it used too: ![image](https://user-images.githubusercontent.com/602439/155346319-7b8f5e10-846f-44c4-8109-cdb3896109e4.png)
Author
Owner

@zadjii-msft commented on GitHub (Feb 23, 2022):

Okay then this is probably just /dup #1503 which covers the much broader issue here. "emoji" is being used as a synonym for "anything that isn't just a single WCHAR". Thanks for following up!

@zadjii-msft commented on GitHub (Feb 23, 2022): Okay then this is probably just /dup #1503 which covers the much broader issue here. "emoji" is being used as a synonym for "anything that isn't just a single WCHAR". Thanks for following up!
Author
Owner

@ghost commented on GitHub (Feb 23, 2022):

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!

@ghost commented on GitHub (Feb 23, 2022): 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#13526