Jul 28, 2010

Removing ^M from files in Windows

For my previous problem with the uuencode on windows, I had to remove
the ^M from the files.

  • Using jEdit to load the uuencoded file and switch the line encoding of
    the current buffer and store the file again. 
  • Using gVim ( vi Improved on Windows ) is at the start a little problem,
    because there the key - is mapped to a different function
    as on Solaris.
    • You have to set the file format to unix
          :set ffs       ---> fileformats=dos,unix
        :set ffs=unix
    • Reload the file with :e  
    • Replace the ^M with
      :%s/--m//g
    • Store the file