Convert a text file's encoding