Text user interface looks distorted when run from PowerShell or Cmd #16803

Open
opened 2026-01-31 05:23:31 +00:00 by claunia · 0 comments
Owner

Originally created by @thorstenkampe on GitHub (Feb 17, 2022).

Windows Terminal version

1.12.220208003-release1.12

Windows build number

10.0.22000.0

Other Software

Python 3.10.2
npyscreen 4.10.5

Steps to reproduce

Run the following code to create a simple text user interface with Npyscreen from PowerShell or cmd:

import sys
from npyscreen import *

class DbApp(NPSAppManaged):
    def onStart(self):
        self.registerForm('MAIN', DbParams())

class DbParams(ActionForm):
    def create(self):
        self.host   = self.add(TitleText, name='- Host:')
        self.port   = self.add(TitleText, name='- Port:')
        self.db     = self.add(TitleText, name='- Database:')
        self.user   = self.add(TitleText, name='- User:')
        self.passwd = self.add(TitlePassword, name='- Password:')

    def on_cancel(self):
        sys.exit()

DbApp().run()

Expected Behavior

This is how it should look like - and actually does in Windows Terminal if I run the code from Cygwin bash (also looks fine in ConEmu or Conhost):
image

Actual Behavior

This is how it looks like when run from Windows PowerShell or Cmd:
image

Originally created by @thorstenkampe on GitHub (Feb 17, 2022). ### Windows Terminal version 1.12.220208003-release1.12 ### Windows build number 10.0.22000.0 ### Other Software Python 3.10.2 npyscreen 4.10.5 ### Steps to reproduce Run the following code to create a simple text user interface with Npyscreen from PowerShell or cmd: ```python import sys from npyscreen import * class DbApp(NPSAppManaged): def onStart(self): self.registerForm('MAIN', DbParams()) class DbParams(ActionForm): def create(self): self.host = self.add(TitleText, name='- Host:') self.port = self.add(TitleText, name='- Port:') self.db = self.add(TitleText, name='- Database:') self.user = self.add(TitleText, name='- User:') self.passwd = self.add(TitlePassword, name='- Password:') def on_cancel(self): sys.exit() DbApp().run() ``` ### Expected Behavior This is how it should look like - and actually does in Windows Terminal if I run the code from Cygwin bash (also looks fine in ConEmu or Conhost): ![image](https://user-images.githubusercontent.com/475462/154568875-eaeabb57-abab-4bde-b592-3f3159d083ac.png) ### Actual Behavior This is how it looks like when run from Windows PowerShell or Cmd: ![image](https://user-images.githubusercontent.com/475462/154569045-31011365-e1f2-4f1e-acf9-e48358de0696.png)
claunia added the Needs-TriageIssue-BugResolution-ExternalNeeds-Tag-Fix labels 2026-01-31 05:23:31 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#16803