It looks like Windows is doing something. Maybe. Run this at a command line:
wmic process get name>wmic2.txt
tee32 wmic process get name>wmic3.txt
wmic2.txt is in utf-16 format.
But now look at wmic3.txt, try: g32 -b-3 wmic3.txt
That is what the editor gets when we run capture(....
Ah Ha!
I'm using CreateProcessA() in both the editor's capture() and tee32.exe.
It is translating the utf-16 to ascii.
Ok, so now that I know that, I can investigate ReadFile() leaving the
extra carriage-returns/