Sometimes, I face character encoding issues while making minor edits via a SFTP console connected to a Linux server. I found a quick hack to change the file encoding using vim on the command line.

In this example, I'm changing the encoding of the file to unix:

vim $filename +"set ff=unix" +wq

Hope you found this helpful!