title: Escaped Unicode sometimes renders correctly, but sometimes renders as HTML entites
body: <p>I'm running into an issue where certain values in my .properties file do not render correctly in my UI, yet most do. Instead of letters with diacritics, I see HTML entity names. I'll explain what I've done so far:</p>
  
  <p>At first I could not get any letters with diacritics to render correctly. Luckily I found <a href="https://stackoverflow.com/questions/4659929/how-to-use-utf-8-in-resource-properties-with-resourcebundle">this post</a>, and I was able to make progress by using escaped Unicode in my .properties file.</p>
  
  <p>(On a side note, while escaped Unicode mostly solved the issue, it made the .properties file difficult to read. Luckily, IDEA gives you an option to use escaped unicode &amp; still read the file with the human-readable chars. Read more <a href="http://www.jetbrains.com/idea/webhelp/configuring-encoding-for-properties-files.html" rel="nofollow noreferrer">here</a>.)</p>
  
  <p>Now here's my current issue: In certain parts of my app, letters with diacritics appear as Latin-1 HTML entity names. For example, instead of 'ç', I see "&amp; amp;ccedil;" (I added an extra space in between the &amp; and amp, otherwise it renders as an ampersand). At first, I had no idea what that even meant, but after looking at <a href="http://www.w3schools.com/tags/ref_entities.asp" rel="nofollow noreferrer">this table</a>, I know it's an ISO-8859-1 entity name.</p>
  
  <p>Here's what I've tried to far, although nothing has successful given me the chars with diacritics. </p>
  
  <ol>
  <li><p>Although I'm still using Glassfish 2, I found <a href="https://stackoverflow.com/questions/6279504/unable-to-change-charset-from-iso-8859-1-to-utf-8-in-glassfish-3-1">this post</a>, and tried adding the following to my web.xml</p>
  
  <pre><code>&lt;jsp-config&gt;
      &lt;jsp-property-group&gt;
          &lt;url-pattern&gt;*.jsp&lt;/url-pattern&gt;
          &lt;page-encoding&gt;UTF-8&lt;/page-encoding&gt;
      &lt;/jsp-property-group&gt;
  &lt;/jsp-config&gt;
  </code></pre>
  
  <p>Now, when I check the response headers in Chrome dev tools, I can see the the following:</p>
  
  <pre><code> Content-Type:text/html;charset=UTF-8
  </code></pre>
  
  <p>However, I still see the aforementioned HTML entity names in my UI.</p></li>
  <li><p>I tried explicitly setting the charset within the JSP itself by adding the following to the JSP where the values are pulled from the .properties file:</p>
  
  <pre><code>&lt;%@page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %&gt;
  </code></pre></li>
  <li><p>While trying to fix this, I've read that ISO 8895-1 is the default encoding for properties files, so I tried changing the encoding within IDEA (I'm using 11, btw). You can do so by going to Settings > File Encodings. At the bottom is an option entitled "Default encoding for properties file", and I changed it to UTF-8. However, I still see the HTML entity names.</p></li>
  </ol>
  
  <p>I've been trying for a while now, and I'm finally at my wits' end. Any advice?</p>