In windows, if you write to a file in TEXT mode, '\n' will write '\r\n'. However, it still considers '\n' to be 0x0A and '\r' to be 0x0D, in terms of binary values.