char NULL (ascii 0) output is not correct #225

Closed
opened 2026-01-30 21:46:13 +00:00 by claunia · 5 comments
Owner

Originally created by @kshji on GitHub (Apr 14, 2018).

I have reported already 2016 this not so nice "feature"
https://wpdev.uservoice.com/forums/266908-command-prompt-console-windows-subsystem-for-l/suggestions/17333083-char-null-ascii-0-output-is-not-correct?tracking_code=8a902269b3213e3538028abae608ca5a

Win 10 WSL

Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial

LANG fi_FI.UTF-8

GNU bash, versio 4.3.48(1)-release (x86_64-pc-linux-gnu),
same result also using ksh => console problem.

WSL console

printf A'\000'A output is A A, but all other *nix consoles, putty, ... output is AA = ascii(0) is not visible.
Originally created by @kshji on GitHub (Apr 14, 2018). I have reported already 2016 this not so nice "feature" https://wpdev.uservoice.com/forums/266908-command-prompt-console-windows-subsystem-for-l/suggestions/17333083-char-null-ascii-0-output-is-not-correct?tracking_code=8a902269b3213e3538028abae608ca5a Win 10 WSL Distributor ID: Ubuntu Description: Ubuntu 16.04.3 LTS Release: 16.04 Codename: xenial LANG fi_FI.UTF-8 GNU bash, versio 4.3.48(1)-release (x86_64-pc-linux-gnu), same result also using ksh => console problem. **WSL console** <code> printf A'\000'A </code> output is A A, but all other *nix consoles, putty, ... output is AA = ascii(0) is not visible.
claunia added the Issue-FeatureProduct-ConhostResolution-Fix-AvailableArea-Output labels 2026-01-30 21:46:13 +00:00
Author
Owner

@bitcrazed commented on GitHub (May 3, 2018):

@kshji Thanks for filing, but what are you using to printf?

Detailed repro steps are extremely helpful to allow us to track down and fix issues.

Thanks in advance.

@bitcrazed commented on GitHub (May 3, 2018): @kshji Thanks for filing, but what are you using to printf? Detailed repro steps are extremely helpful to allow us to track down and fix issues. Thanks in advance.
Author
Owner

@kshji commented on GitHub (Aug 16, 2018):

Interesting question. If that command not work correctly, why it's not enough ?
Use it, try it, you will see the problem. If you like to make ex. something to keep alive, printing NULL has been safety method for that and ouput is nothing on terminal = cursor not change the location. Something i/o keep alive and output to the terminal has been nothing, over 30 years has worked in all terminals and platforms. Except if you use this platform.

Yes it's possible to make fake tput outset and move curost back to previous location. But NULL has been

@kshji commented on GitHub (Aug 16, 2018): Interesting question. If that command not work correctly, why it's not enough ? Use it, try it, you will see the problem. If you like to make ex. something to keep alive, printing NULL has been safety method for that and ouput is nothing on terminal = cursor not change the location. Something i/o keep alive and output to the terminal has been nothing, over 30 years has worked in all terminals and platforms. Except if you use this platform. Yes it's possible to make fake tput outset and move curost back to previous location. But NULL has been
Author
Owner

@j4james commented on GitHub (Dec 10, 2019):

I'm fairly sure this was fixed by PR #3015.

@j4james commented on GitHub (Dec 10, 2019): I'm fairly sure this was fixed by PR #3015.
Author
Owner

@kshji commented on GitHub (Dec 10, 2019):

Only in Windows Terminal.
But when in-box conhost.exe will include ex. this fixing and many other fixes which Windows Terminal has got many months ago ?

@kshji commented on GitHub (Dec 10, 2019): Only in Windows Terminal. But when in-box conhost.exe will include ex. this fixing and many other fixes which Windows Terminal has got many months ago ?
Author
Owner

@DHowett-MSFT commented on GitHub (Dec 10, 2019):

@kshji when the rest of Windows updates. We have been ingesting the fixes made to conhost in this repository back into Windows since May. Many of these changes are already available in insiders’ builds.

@DHowett-MSFT commented on GitHub (Dec 10, 2019): @kshji when the rest of Windows updates. We have been ingesting the fixes made to conhost in this repository back into Windows since May. Many of these changes are already available in insiders’ builds.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#225