microsoft / microsoft/terminal
App output different in Terminal than conhost with null characters
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 105k
- Forks
- 9.6k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 29
Description
Environment
Windows build number: 21280
Windows Terminal version (if applicable): 1.5.3242.0 (Preview)
Any other software?
Steps to reproduce
Run the project in https://github.com/asklar/textlogo
The program initializes a text buffer, draws something in it, then prints it to stdout.
It looks like Terminal treats Console.WriteLine('\0') as a no-op when it should be interpreting it as "write a space".
If I initialize my buffer to spaces, then the bug goes away, but this should not be necessary and it's a breaking behavior between conhost and terminal.
Expected behavior
In conhost, this prints:

Actual behavior
In Terminal, this prints:

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the behavior using the asklar/textlogo project described in the issue, comparing its stdout output in Windows Terminal and conhost. Focus on the handling of null characters from Console.WriteLine('\0'); the issue is resolved when both environments produce the expected output without requiring a space-initialized buffer.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100