Unexpected character change when running WSL in Windows Terminal #11770

Closed
opened 2026-01-31 02:56:52 +00:00 by claunia · 3 comments
Owner

Originally created by @GuyPerson7018 on GitHub (Dec 11, 2020).

Environment

Windows build number: Microsoft Windows [Version 10.0.18363.1198]
Windows Terminal version (if applicable):
Latest Windows Terminal from Microsoft Store
Any other software?
WSL2(Kali Linux) from Microsoft store

Steps to reproduce

Step 1: Open cmd in Windows Terminal
Step 2: Type wsl and enter
Step 3: Type echo $'\en' and press enter

Expected behavior

Nothing much should happen(this is what happens in the original cmd)

Actual behavior

The font(or character set) changes completely, the only fix is to close and reopen the tab.
For example, when I type "echo Hello world", this is what I get:  åãèï Èåììï ÷ïòìä
However, it still works fine, apart from it being unreadable, I got the expected output from the previous command of "Èåììï ÷ïòìä"

Originally created by @GuyPerson7018 on GitHub (Dec 11, 2020). # Environment ```none Windows build number: Microsoft Windows [Version 10.0.18363.1198] Windows Terminal version (if applicable): Latest Windows Terminal from Microsoft Store Any other software? WSL2(Kali Linux) from Microsoft store ``` # Steps to reproduce Step 1: Open cmd in Windows Terminal Step 2: Type wsl and enter Step 3: Type echo $'\en' and press enter # Expected behavior Nothing much should happen(this is what happens in the original cmd) # Actual behavior The font(or character set) changes completely, the only fix is to close and reopen the tab. For example, when I type "echo Hello world", this is what I get:  åãèï Èåììï ÷ïòìä However, it still works fine, apart from it being unreadable, I got the expected output from the previous command of "Èåììï ÷ïòìä"
claunia added the Needs-TriageNeeds-Tag-Fix labels 2026-01-31 02:56:52 +00:00
Author
Owner

@DHowett commented on GitHub (Dec 11, 2020):

We recently gained support for the various character sets and character set shifts required for vt510 compliance.

\en shifts G2 (character set selection 2) into GL (left half of active character set). The default value for G2 in an unconfigured vt510 is “ISO Latin-1”, which contains common special characters for Latin-derived languages. Mapping it over the “left” half of the character set replaces the standard printable range with the Latin-1 special characters. You can change G0-G3 using SCS!

This is by design. Control sequences are being interpreted as required.

@DHowett commented on GitHub (Dec 11, 2020): We recently gained support for the various [character sets](https://www.vt100.net/docs/vt510-rm/chapter7.html#S7.2) and [character set shifts](https://www.vt100.net/docs/vt510-rm/LS.html) required for vt510 compliance. \en shifts G2 (character set selection 2) into GL (left half of active character set). The default value for G2 in an unconfigured vt510 is “ISO Latin-1”, which contains common special characters for Latin-derived languages. Mapping it over the “left” half of the character set replaces the standard printable range with the Latin-1 special characters. You can change G0-G3 using [SCS](https://www.vt100.net/docs/vt510-rm/SCS.html)! This is by design. Control sequences are being interpreted as required.
Author
Owner

@DHowett commented on GitHub (Dec 11, 2020):

(You can undo it by re-mapping G0 over GL with \x0f)

@DHowett commented on GitHub (Dec 11, 2020): (You can undo it by re-mapping G0 over GL with \x0f)
Author
Owner

@DHowett commented on GitHub (Dec 11, 2020):

And finally, this change will eventually be available in the traditional Windows console. If you’re on an insider build, this should work the same outside of Terminal already!

@DHowett commented on GitHub (Dec 11, 2020): And finally, this change will eventually be available in the traditional Windows console. If you’re on an insider build, this should work the same outside of Terminal already!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#11770