Wrong printed/parsed characters on Terminal #19611

Closed
opened 2026-01-31 06:48:41 +00:00 by claunia · 6 comments
Owner

Originally created by @D3vil0p3r on GitHub (Mar 30, 2023).

Windows Terminal version

1.16.10262.0

Windows build number

Microsoft Windows NT 10.0.22621.0

Other Software

python 3.10.10

Steps to reproduce

By using Windows Terminal with WSL, the \001 and \002 Python characters are not parsed correctly.

Open WSL container of Ubuntu or Arch Linux. Run:

if Ubuntu:

python3

if Arch:

python

Once Python is run, type the following:

MAIN = '\001\033[38;5;85m\002'
END = '\001\033[0m\002'
INFO = f'{MAIN}Info{END}'
print(f'\r[{INFO}] Core server started on')

The result will be:
image

The reason of using \001 and \002 when colors should be used is described in https://bugs.python.org/msg208948

This issue seems to appear only on Windows Terminal with and without WSL (with different displaying characters output).

Issue opened here as agreed in https://github.com/microsoft/WSL/issues/9870

Expected Behavior

The result should be:

[Info] Core server started on

Note that the real output has Info string colored.

Actual Behavior

The wrong result is:
image

Originally created by @D3vil0p3r on GitHub (Mar 30, 2023). ### Windows Terminal version 1.16.10262.0 ### Windows build number Microsoft Windows NT 10.0.22621.0 ### Other Software python 3.10.10 ### Steps to reproduce By using Windows Terminal with WSL, the `\001` and `\002` Python characters are not parsed correctly. Open WSL container of Ubuntu or Arch Linux. Run: if Ubuntu: ``` python3 ``` if Arch: ``` python ``` Once Python is run, type the following: ```python MAIN = '\001\033[38;5;85m\002' END = '\001\033[0m\002' INFO = f'{MAIN}Info{END}' print(f'\r[{INFO}] Core server started on') ``` The result will be: ![image](https://user-images.githubusercontent.com/83867734/228796299-c31d6307-6a2f-46bf-9de7-9a64f7f6ffdf.png) The reason of using `\001` and `\002` when colors should be used is described in https://bugs.python.org/msg208948 This issue seems to appear only on Windows Terminal with and without WSL (with different displaying characters output). Issue opened here as agreed in https://github.com/microsoft/WSL/issues/9870 ### Expected Behavior The result should be: ``` [Info] Core server started on ``` Note that the real output has `Info` string colored. ### Actual Behavior The wrong result is: ![image](https://user-images.githubusercontent.com/83867734/228796392-6fb1a02a-9e5d-4a79-962a-cc53aa717ef3.png)
claunia added the Needs-TriageIssue-BugResolution-Duplicate labels 2026-01-31 06:48:41 +00:00
Author
Owner

@j4james commented on GitHub (Mar 30, 2023):

Thanks for the detailed report, but we do already have an issue for this. It's being tracked in #10786.

@j4james commented on GitHub (Mar 30, 2023): Thanks for the detailed report, but we do already have an issue for this. It's being tracked in #10786.
Author
Owner

@D3vil0p3r commented on GitHub (Mar 30, 2023):

Thanks for the detailed report, but we do already have an issue for this. It's being tracked in #10786.

Thank you for the answer. I hope it will fix soon. The linked issue was opened on July 2021.

@D3vil0p3r commented on GitHub (Mar 30, 2023): > Thanks for the detailed report, but we do already have an issue for this. It's being tracked in #10786. Thank you for the answer. I hope it will fix soon. The linked issue was opened on July 2021.
Author
Owner

@zadjii-msft commented on GitHub (Mar 30, 2023):

Thanks!

/dup #10786

@zadjii-msft commented on GitHub (Mar 30, 2023): Thanks! /dup #10786
Author
Owner

@microsoft-github-policy-service[bot] commented on GitHub (Mar 30, 2023):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@microsoft-github-policy-service[bot] commented on GitHub (Mar 30, 2023): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Author
Owner

@microsoft-github-policy-service[bot] commented on GitHub (Mar 30, 2023):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@microsoft-github-policy-service[bot] commented on GitHub (Mar 30, 2023): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Author
Owner

@microsoft-github-policy-service[bot] commented on GitHub (Mar 30, 2023):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@microsoft-github-policy-service[bot] commented on GitHub (Mar 30, 2023): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#19611