microsoft / microsoft/terminal

Some Unicode characters appear to be recognised incorrectly

Open
#9,308 10 comments 0 reactions 0 assignees View on GitHub
Area-Input Issue-Bug Needs-Attention Priority-2 Product-Conpty Product-Terminal
Dominant language
C++
Stars
105k
Forks
9.6k
Avg merge
3d 17h
Merged PRs (30d)
29

Description

# Environment

```none
Windows build number: 10.0.19041.0 Microsoft Windows NT 10.0.19041.0
Windows Terminal version (if applicable): 1.5.10411.0
```

Any other software?
I used UnicodeInput from [here](https://www.fileformat.info/tool/unicodeinput/index.htm) to enter Unicode characters, but other utilities for entering Unicode produce the same issue.

# Steps to reproduce

Open a Windows terminal window using cmd or Powershell
Enter a character ff (fb00). I did this using `Alt-+` to run UnicodeInput, and then entered the code fb00.
The character displayed at the prompt is 翿, not ff.

# Expected behavior

The ff character gets entered

# Actual behavior

The 翿 character is displayed

# Analysis

The character code for 翿 is 32767, and indeed any character with a code greater than 32767 appears to be replaced with 翿. So it looks like what is happening is that there is something masking the character to a 16-bit value, rather than accepting a full Unicode character.

Other applications, including Notepad and the basic command prompt (outside of Windows Terminal) don't do this, so it looks like a Windows Terminal specific issue.

Using cut and paste to enter the ff character works fine, it's only when a character is entered "directly" that there is an issue.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue in Windows Terminal with cmd or PowerShell, entering U+FB00 directly and comparing it with paste and the basic command prompt. Trace the direct Unicode input path and verify that U+FB00 displays ff rather than 翿, including characters above code point 32767.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.