terminal: Default all G-sets to ASCII unless ISO-2022 is requested (was: Terminal breaks on \x1b O)

Windows Terminal version (or Windows build number)

1.8.1521.0

Other Software

OpenSSH_5.3p1

Steps to reproduce

  1. SSH to linux server (for me it’s CentOS, if it matters)
  2. echo -e '\x1bo'

Expected Behavior

I expect that terminal will continue to work properly

Actual Behavior

I can no longer type “actual” text in terminal, every key press transforms in a mess seen on screenshot. CTRL+Something sequences are also no longer working.

изображение

Stumbled upon this issue when I was debugging gsm7 encodings in python program (\x1b is a common byte for this encoding). On yet another ‘print()’ terminal became a mess.

Issue is not reproduced if i’m using powershell.exe or cmd.exe without it being embeded in WT.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 24 (5 by maintainers)

Commits related to this issue

Most upvoted comments

If it happens again in a python console, you can use print '\x1bc' to reset. Not suggesting that’s a good long term solution, but it’s better than having to exit and restart.