Hi, a simple question but I can't find the answer ....

-> How can I convert my data to utf-8 encoding??



I have an outputstream (out of JAXB) and I want to write it as servlet response:

FacesContext faces = FacesContext.getCurrentInstance(); HttpServletResponse response = (HttpServletResponse) faces.getExternalContext().getResponse();
       response.setContentType("text/xml");
       response.setHeader("Content-disposition","attachment; filename=...
        while (Reader.ready()) {
response.getOutputStream().println(Reader.readLine()); ################### here I need the encoding
         }

       response.getOutputStream().flush();
       faces.responseComplete();
      Reader.close();

.. all of this works fine, the only problem I have is with the character encoding

Greets, Hans


Reply via email to