Auto-recognize the file encoding.