How do I change this. ResponseWriter has a public method for inquiring the character encoding but no method for changing it. It is handled by Facelets themselves.
// retrieve contents from DB
byte dbcontent = reportVO.getReportDesign();
// create an input stream of it
InputStream is = new ByteArrayInputStream(dbcontent);
// return a treated output stream (byte array output stream)
ByteArrayOutputStream os = (ByteArrayOutputStream) ReportEngineService.getInstance().runAndRenderReportAsHtmlStream(is, options.getRequest());
// create a new string with encoding UTF-8 (even if the encoding is UTF-8, you never know what the db driver does)
String output = os.toString(“UTF-8”);
// get ResponseWriter
ResponseWriter writer = options.getContext().getResponseWriter();