Page 1 of 1

Question about NUL char.

Posted: 05 Sep 2011 03:14
by darioit
Hello,

someone could explain because Hex 00 make EOF on txt file, and cause termination of routine like this?
FOR /F "tokens=* skip=10" %%i IN (%2) DO echo %%i

The line after Nul char are not view

Regards
Dario

Re: Question about NUL char.

Posted: 05 Sep 2011 03:48
by jeb
Hi darioit,

I suppose the reasons could be that the internal termination character
in the memory is the NUL character for all variables.

Once Joey has examine this, that the variables are stored like
var1=abcdefr\0var2=hgftr\0path=C:\windows\0

EDIT: But you can retest it with the set/p technic, this can read after a NUL character
Only the characters after the null in the current line are removed,
they seem to be unreachable

jeb