protected Interpretation parse(InputStream is, String path, String orgpath) throws Exception { final String content = Files.readAll(new InputStreamReader(is, "UTF-8")).toString(); String ctype = Interpreter.getContentType(path); if (ctype == null) ctype = ";charset=UTF-8"; else if (ctype.indexOf(';') < 0 && !ContentTypes.isBinary(ctype)) ctype += ";charset=UTF-8"; return new Interpreter().parse(content, ctype, null, _webctx.getLocator()); }
if (k >= 0) ctype = ctype.substring(0, k); if (!ContentTypes.isBinary(ctype)) ctype += ";charset=UTF-8";