Charles Dye
Super Moderator
- May
- 5,070
- 133
Staff member
Code:
C:\>option //unicodeoutput=no
C:\>setdos | tail /n 4
PARAMETERS=$
CURSOR OVERSTRIKE=100
CURSOR INSERT=15
VERBOSE=1
C:\>option //unicodeoutput=yes
C:\>setdos | tail /n 4
CURSOR OVERSTRIKE=100
CURSOR INSERT=15
VERBOSE=1
C:\>option //unicodeoutput=no
C:\>setdos | tail /n 4
PARAMETERS=$
CURSOR OVERSTRIKE=100
CURSOR INSERT=15
VERBOSE=1
C:\>
One of my "bugs nobody cares about" involved @EXECSTR[-n,command] sometimes returning a 'phantom' blank line. After @ClioCJS's post about @EXECSTR failing if you alias TAIL, it has dawned on me that this is actually an oddity of TAIL. If the input text is UTF-16 and the last line ends in CR/LF (possibly other line-ends too; I haven't checked), then TAIL infers a final empty line. This does not happen with ANSI or UTF-8 input.