title: Why is UTF-8 encoded chars not being displayed correctly on remote machine only
body: <p>When I view this webpage which is physically encoded as UTF-8 and has UTF-8 specified as the charset on my PC (using firefox) it does not display characters that need to be encoded with multiple bytes properly such as as the ö in Björk, please click on the link and then open up the B section to see what I mean</p>
  
  <p><a href="http://www.jthink.net/songkong/reports/FixSongsReport00084/FixSongsReport00084_index.html">http://www.jthink.net/songkong/reports/FixSongsReport00084/FixSongsReport00084_index.html</a></p>
  
  <p>(The page is hosted on a linux server using jakarta-tomcat)</p>
  
  <p>However the original file displays perfectly okay in Firefox when stored as a file on my harddrive. I even copied the file back from the remote site to my local PC to esure had the same file, and it still displays okay.</p>
  
  <p>So how come it doesn't display ok on the website, could it be a tomcat problem ?</p>
  
  <p><strong>EDIT</strong>
  In the comment on the first answer it says i need to ensure that I need to set the response encoding correctly, how do I do this - the html page is not generated by code tomcat is just serving the page as provided</p>
  
  <p>Note I don't to parse uri parameters as utf8, and I dont want the jsp pages that I created encoded as UTF8, these work fines as ISO-8859-1 and may break if I change them. I just want .html pages to be displayed as UTF8 , and only for this application, I have multiple applications in webapps folder and I am using Tomcat 7</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>So as suggested in the answer below I've added to my web.xml file</p>
  
  <pre><code> &lt;filter&gt;
      &lt;filter-name&gt;CharacterEncoding&lt;/filter-name&gt;
      &lt;filter-class&gt;org.apache.catalina.filters.SetCharacterEncodingFilter&lt;/filter-class&gt;
      &lt;init-param&gt;
          &lt;param-name&gt;encoding&lt;/param-name&gt;
          &lt;param-value&gt;UTF-8&lt;/param-value&gt;
      &lt;/init-param&gt;
  &lt;/filter&gt;
  &lt;mime-mapping&gt;
    &lt;extension&gt;html&lt;/extension&gt;
    &lt;mime-type&gt;text/html;charset=UTF-8&lt;/mime-type&gt;
  &lt;/mime-mapping&gt;
  </code></pre>
  
  <p>and that sort of works, the url now displays correctly, but the link doesn't work.</p>
  
  <p>When I have a look at the source it seems to be using the correct link, <strong>but the error message shows it as an expanded notation rather than UTF8</strong>. </p>
  
  <p>hers the whole report, so you can click on link in left handside and see result in righthandside</p>
  
  <p><a href="http://www.jthink.net/songkong/reports/FixSongsReport00084/FixSongsReport00084.html">http://www.jthink.net/songkong/reports/FixSongsReport00084/FixSongsReport00084.html</a></p>
  
  <p>Even if I copy link and paste it doesnt work as the link seems thats get pasted is wrong, although it then corrects itself</p>