I\'m used to using vim to modify a file\'s line endings:
$ file file file: ASCII text, with CRLF line terminators $ vim file :set ff=mac :wq $ file file file
Notice that there is a difference between
set encoding
and
set fileencoding
In the first case, you'll change the output encoding that is shown in the terminal. In the second case, you'll change the output encoding of the file that is written.