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
Just like your steps, setting fileencoding should work. However, I'd like to add one "set bomb" to help editor consider the file as UTF8.
$ vim file :set bomb :set fileencoding=utf-8 :wq