R.Wieser
2018-02-28 11:15:26 UTC
Hello All,
I'm writing some script to check if a certain file does infact contain
unicode, or is just ASCII formatted that way. The code is nothing special,
just using a ReadAll to get the file contents, and than function which
checks the first two chars (&hFF, &hFE) and a loop checking each second char
(&h00).
The odd thing is that I got back that one of those &h00 checks failed, when
I could see (using a hex editor) that all of those where infact zero.
When I added a wscript.echo to show the index and the contents the problem
disappeared. When I removed the line again the problem came back. Huh ?
It became stranger though: when I just placed an empty line there the
problem went away too.
And than sometimes adding an empty line somewhere else (regardless of the
middle, begin or end of the script) made the location of the failed check
change - or disappear.
I'm confused, and worried: what is going on here ?
Regards,
Rudy Wieser
I'm writing some script to check if a certain file does infact contain
unicode, or is just ASCII formatted that way. The code is nothing special,
just using a ReadAll to get the file contents, and than function which
checks the first two chars (&hFF, &hFE) and a loop checking each second char
(&h00).
The odd thing is that I got back that one of those &h00 checks failed, when
I could see (using a hex editor) that all of those where infact zero.
When I added a wscript.echo to show the index and the contents the problem
disappeared. When I removed the line again the problem came back. Huh ?
It became stranger though: when I just placed an empty line there the
problem went away too.
And than sometimes adding an empty line somewhere else (regardless of the
middle, begin or end of the script) made the location of the failed check
change - or disappear.
I'm confused, and worried: what is going on here ?
Regards,
Rudy Wieser