title: Clarification of UTF-8 and ISO-8859-1 encoding when used with JSP pages, and Tomcat
body: <p>I must be having issues putting two and two together when it comes to encoding but there are quite a few stackoverflow questions regarding encoding so I must not be the only one!  Currently, I have a simple JSP page that has a struts action form containing a single user text input with a default value of PÃ mies OlivÃ©s.  </p>
  
  <pre><code>&lt;%@page contentType="text/html;charset=UTF-8"%&gt;
  
  &lt;form method="get" action="login.jsp"&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>&lt;tr&gt;&lt;td&gt;Full Name:&lt;/td&gt;&lt;td&gt;&lt;input type="text" name="fullName" value="PÃ mies OlivÃ©s" size="35"&gt;&lt;/td&gt;&lt;/tr&gt;
  
  
  &lt;tr&gt;&lt;td colspan="2"&gt;&lt;br&gt;&lt;input type="submit" name="submit" value="submit"&gt;&lt;/td&gt;&lt;/tr&gt;
  </code></pre>
  
  <p>
  </p>
  
  <p>If a user hits submit with that default value I have a scriptlet output the user's inputted value to the page so I can see it.  I get the expected PÃ mies OlivÃ©s when having Tomcat and the page's charset set to UTF-8.  However, if I try to use ISO-8859-1 encoding in Tomcat I get an output of PÃÂ mies OlivÃÂ©s or if I set both Tomcat and the charset of the page to ISO-8859-1 the value becomes PÃƒÂ mies OlivÃƒÂ©s.  What would be causing this discrepancy with the ISO-8859-1 encoding?  </p>