1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'TCC/LE Support' started by rhubarb, Mar 26, 2013.

  1. rhubarb

    Joined:
    Mar 26, 2013
    Messages:
    13
    Likes Received:
    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?
     
  2. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    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).
     
    rhubarb likes this.
  3. rhubarb

    Joined:
    Mar 26, 2013
    Messages:
    13
    Likes Received:
    0
    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
     

Share This Page