WAD getting null ascii chars (spaces) in redirected or piped output

Mar 26, 2013
13
0
This problem started a while ago and I don't know what triggered it, I thought it was due to mixing TCCLE with cygwin or with CONSOLE2, but I can reproduce it without those. What happens is that some commands, when redirecting or piping to others, produce output with what looks like spaces between every character, but when I output to a text file and examine it, each "space" is actually an ASCII NULL (zero ascii code) charcacter. Here's an example with purely internal commands DIRS and TYPE

[C:\]
[C:\]dirs | type
: \ u t i l s \ C o n s o l e 2 6 4
C : \ u t i l s \ C o n s o l e 2 6 4
C : \ a d v \ t r u n k
C : \ a d v \ t r u n k

[C:\]which type
type is an internal command

[C:\]which dirs
dirs is an internal command
Any ideas?
 
May 20, 2008
3,515
4
Elkridge, MD, USA
Simple! Verify that Options -> Startup -> Unicode output is not checked!
ASCII to Unicode translation is simply to add an all-zero high order byte (changing 8-bit characters to 16-bit characterrs).
 
  • Like
Reactions: rhubarb
Mar 26, 2013
13
0
Simple! Verify that Options -> Startup -> Unicode output is not checked!
ASCII to Unicode translation is simply to add an all-zero high order byte (changing 8-bit characters to 16-bit characterrs).
unbelievable - I've been putting up with this for so long before going to the effort of signing up and asking. I can't believe I missed it too because I went through options checking and unchecking options above and below that one.
Thank you thank you thank you