detectType() returns both filetype and encoding; fix for latin1