F:read("*a") seems not working correctly on Windows?

Yes, for binary files, you need to take care to write and read in binary format.
Otherwise white spaces may be interpreted in the wrong fashion, and you won’t get the exact same data as exists on disc.

1 Like