if( !file.canRead() )
throw new Error(CLI.messages().fileCantRead(file));
if( !file.isFile() )
throw new Error(CLI.messages().isNotFile(file));
FileCharsetDetector detect = new FileCharsetDetector(file);
Charset cs = detect.getCharset();
if( cs==null ){
cs = Charset.defaultCharset();
System.out.println(CLI.messages().usedDefaultCharset(cs));
}