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

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
Mar 26, 2013
13
0
#1
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?
 
Mar 26, 2013
13
0
#3
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