How newline character "^M" appeared in file?

I have two files. Diff and hexdump tell that they are identical. However vi shows windows newline characters "^M" in one of these files. How is this possible?

Hi,

This is not what I'm seeing, well with diff anyway.

-bash-3.2$ vi test_01
"test_01" [New file]
now is the time for all good men to come to the aid of the party^M
now is the time for all good men to come to the aid of the party^M

~
"test_01" [New file] 29 lines, 1914 characters
-bash-3.2$ cp test_01 test_02
-bash-3.2$ vi test_02
"test_02" 29 lines, 1914 characters
now is the time for all good men to come to the aid of the party
now is the time for all good men to come to the aid of the party

~
"test_02" 29 lines, 1885 characters
-bash-3.2$ diff test_01 test_02
1,29c1,29
< now is the time for all good men to come to the aid of the party
< now is the time for all good men to come to the aid of the party

---
> now is the time for all good men to come to the aid of the party
> now is the time for all good men to come to the aid of the party

-bash-3.2$
-bash-3.2$ hexedit test_01
-bash: hexedit: command not found
-bash-3.2$

Can you let me see the version of diff that you are using.

Regards

Gull04

How do you use hexdump to check for identity of files? Anyhow, when I hexdump a DOS file, I see the 0d chars at EOL...