is = EclipseIFileUtil.getInputStreamFrom(file);
UniversalDetector detector = new UniversalDetector(null);
byte[] buf = new byte[4096];
int nread;
while ((nread = is.read(buf)) > 0 && !detector.isDone())
detector.handleData(buf, 0, nread);
detector.dataEnd();
encoding = detector.getDetectedCharset();
} catch (Exception e) {
Stderr.p("EclipseIFileUtil.getDetectedEncodingFrom(IFile): " + e.getClass().getName() + ","
+ e.getLocalizedMessage());