I have a txt file named COPYING which is edited on windows. It contains windows style eol
$ file COPYING
COPYING: ASCII English text, with CRLF line ter
Check out M-x set-buffer-file-coding-system. From the documentation:
(set-buffer-file-coding-system CODING-SYSTEM &optional FORCE NOMODIFY)Set the file coding-system of the current buffer to CODING-SYSTEM. This means that when you save the buffer, it will be converted according to CODING-SYSTEM. For a list of possible values of CODING-SYSTEM, use M-x list-coding-systems.
So, going from DOS to UNIX, M-x set-buffer-file-coding-system unix.