File name has � (invalid encoding) and CRLF issues

On Linux you sometimes you get a “�” in a file name and a trailing “(invalid encoding)” in the filename. This is something that can happen when moving files from Windows to Ubuntu Linux.

http://www.leaseweblabs.com/2013/12/file-name-%EF%BF%BD-invalid-encoding/