title: UTF-8 text (Hindi) not getting displayed on Browser window or Eclipse console
body: <p>I have to display text in Hindi (or any regional language) on the browser screens. I will be getting this text from the database. </p>
  
  <p>For this I started at a very basic level with the following:</p>
  
  <pre><code>String escapedStr = "\\u0905\\u092d\\u0940 \\u0938\\u092e\\u092f \\u0939\\u0948 \\u091c\\u0928\\u0924\\u093e";
  String hindiText = StringEscapeUtils.unescapeJava(escapedStr);
  System.out.println(hindiText);
  return hindiText;
  </code></pre>
  
  <p>I am able to get the Hindi text perfectly fine in the variable <code>hindiText</code>. 
  But when I print it on eclipse console or on the browser screen I get only <code>???? ?? ??</code></p>
  
  <p>I set the default character encoding of my browser as well as my eclipse console to UNICODE(UTF-8). But still no success. </p>
  
  <p>Can anyone help me solve this? What setting am I missing?</p>
  
  <p>Just fyi - I am able to open hindi websites in my browser. So language settings is not an issue.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>As I am using JSP files for my views, I have added the following to my <code>web.xml</code> for setting the character encoding globally. Ref: <a href="http://balusc.blogspot.in/2009/05/unicode-how-to-get-characters-right.html" rel="nofollow">Followed this</a></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>But still no success!</p>