encode file with latin-1 explicitly