title: Parsing Japanese text from web does not give correct characters
body: <p>I have a servlet running in Tomcat that take form data input.</p>
  
  <p>When I enter Japanese characters they show up as the string,</p>
  
  <p>ベースにチェ</p>
  
  <p>which is correct, but when I try to parse the string using charAt and substring I get,</p>
  
  <pre><code>&amp;#12505;&amp;#12540;&amp;#12473;&amp;#12395;&amp;#12481;&amp;#12455;
  </code></pre>
  
  <p>If I enter the same input in a Java client (swing) then chatAt returns,</p>
  
  <p>ベ ー ス に チ ェ</p>
  
  <p>So, something in going wrong somewhere, but I don't understand utf-8 or unicode much, so I have no idea how to fix it?</p>
  
  <p>The html page is basically,</p>
  
  <pre><code>&lt;!DOCTYPE HTML&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta charset="UTF-8"&gt;
  &lt;form action="ChatServlet" method="post"&gt;
  &lt;input type="text" name="input"&gt;
  &lt;input type="submit" name="Submit" value="Submit"&gt;
  </code></pre>
  
  <p>In the servlet I use,</p>
  
  <pre><code>String input = (String)request.getParameter("input");
  char next = input.charAt(0);
  </code></pre>
  
  <p>and next == '&amp;' not 'ベ'</p>
  
  <p>but in swing next == 'ベ'</p>
  
  <p>I want 'ベ', not '&amp;'</p>