file -bi [filename]
http://mindspill.net/computing/linux-notes/determine-and-change-file-character-encoding/