encoding text to latin1