This has nothing to do with binary versus text.
https://learn.microsoft.com/en-us/cpp/c-runtime-library/refe...
> In text mode, carriage return-line feed (CRLF) combinations are translated into single line feed (LF) characters on input, and LF characters are translated to CRLF combinations on output.