Re: STDIN problem with nwc-conv.exe, version 2.1b
Reply #16 –
After half a day of hacking, I figured it out. The problem is Windows Script Host's ReadAll() function.
It returns a string that it says is the correct length, and for 256 bytes after the first NullChar that it encounters, contains the correct data. But for longer strings, all the data after the first NullChar is garbage. If it always contained garbage, or returned the correct length, I would have understood the problem in a few minutes. Grrr...
The workaround is to use:
strSong = .StdOut.Read(&h7FFF)
or for large strings:
Do Until .StdOut.AtEndOfStream
strSong = strSong & .StdOut.Read(&h7FFF)
Loop