microsoft / microsoft/terminal
Problem switching in and out of UTF-8 mode
- Dominant language
- C++
- Stars
- 105k
- Forks
- 9.6k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 29
Description
### Windows Terminal version
1.18.3181.0
### Windows build number
10.0.22621.0
### Other Software
_No response_
### Steps to reproduce
Output the character sequence twice using a tool of your choice:
`Esc % G E2 A3 BF Esc % @`
### Expected Behavior
Each time, the unicode character 28FF ⣿ (Braille Pattern Dots-12345678) will be printed.
### Actual Behavior
The correct character is printed the first time, the second time (and any subsequent times) prints "⣿".
From my reading of the code, this is because Esc % @ (Select Default Character Set) correctly disengages UTF-8 by calling DesignateCodingSystem in ActionCsiDispatch. However, its companion seuqnece Esc % G (Select UTF-8 Character Set) is not handled and thus the sequence is never again rendered in Unicode.
Contributor guide
Research direction
Start in the terminal escape-sequence handling around ActionCsiDispatch and DesignateCodingSystem, comparing the provided Esc % G and Esc % @ sequences. Reproduce the sequence twice and verify that the second output is ⣿ rather than mojibake.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100