title: character encoding in JSF 1.1
body: <p>I'm developing a tool using JSF 1.1 and I'm having this problem :
  I have a String in my backing bean which is printed as:</p>
  
  <pre><code>./src.cpp: In function ‘int main()’:
  ./src.cpp:4: error: ‘dsdada’ was not declared in this scope
  </code></pre>
  
  <p>on a txt file.</p>
  
  <p>But when I put it on a h:inputTextArea, it goes like this:</p>
  
  <pre><code>./src.cpp: In function â€˜int main()â€™:
  ./src.cpp:4: error: â€˜dsdadaâ€™ was not declared in this scope
  </code></pre>
  
  <p>-</p>
  
  <pre><code>&lt;%@ page contentType="text/html;charset=UTF-8" %&gt;
  and this
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/&gt;
  &lt;/head&gt;
  </code></pre>
  
  <p>But it didn't work either.
  can somebody tell me how to fix this. Thanks</p>
  
  <pre><code>/* String[0] as stdout, String[1] as stderr */
  String[] results = sshBO.execCommand(cmd, timeout);
  
  /* Done with SSH things */
  sshBO.closeSession();
  
  /* Bring the output and err to the presentation */
  msg = results[1]+results[0];
  FileServices.saveStringToFile("F:/myoutput.txt", msg);
  msg = new String(msg.getBytes("UTF8"), "UTF8"); /* makes no difference */
  </code></pre>
  
  <p>on the JSP pages :</p>
  
  <pre><code>&lt;%@ page contentType="text/html;charset=UTF-8" %&gt;
  &lt;%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %&gt;
  &lt;%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %&gt;
  &lt;%@ taglib uri="http://sakaiproject.org/jsf/sakai" prefix="sakai" %&gt;
  
  &lt;f:view &gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/&gt;
  &lt;/head&gt;
  ...
  
  &lt;h:inputTextarea disabled="true" value="#{SSH.msg}" styleClass="myTextArea" /&gt;
  </code></pre>