Not able to display special characters
<p>I am unable to display special characters (polish characters) on screen. I have a requirement where I get the data from database which has some special characters.  I get the data in an xml format (The xml is not recognizing it as a string) and pass it to action where I try to display the data.  I am trying to get the Uniciode of the special character as <code>&amp;#X142;</code> but when I try to display, this gets converted to <code>&amp;amp;#X142;</code> and so I am unable to display it because it does not take it as a string.</p>

<pre><code>String ex1="ł";
System.out.println("ex1...."+ex1);
output:: ?
</code></pre>

<p>I am trying to get the Unicode using the following code::</p>

<pre><code>    public static String convert (String str) throws UnsupportedEncodingException
    {
        String tc = str;
        String output = "";
        char[] ca = tc.toCharArray();
        for (int i = 0; i &lt; ca.length; ++i) 
             {
               char a = ca[i];
               if ((int) a &gt; 255) 
                    {
            output += "&amp;"+"#X"+ Integer.toHexString((int) a) + ";";
               } 
                   else 
                   {
            output += a;
              }
        }
        return output;
    }
</code></pre>

<p>The output is: If input is given as <code>str="ł"</code> then <code>output=&amp;#X142;</code></p>
