Hi all,
I found a solution for this. In Java5.0 the Character class provides methods which will return the code point for a given char[] array
codePointAt(char[] a, int index) ;
Using this method we can get the Unicode for a String in any Language which can be displayed on the browser
// here is the method for the same "value" is the String in hindi (or any other) Language
public static String getUnicode(String value)
{
StringBuffer testBuffer = new StringBuffer();
char[] test = value.toCharArray();
if(test != null)
{
int size1 = test.length;
for(int j = 0 ; j < size1;j++)
{
testBuffer.append("");
testBuffer.append(Character.codePointAt(test, j));
testBuffer.append(";");
}
}
return testBuffer.toString();
}
This method will return you the correspoding unicode in dec which you can write to a properties file and use the samefor display
Reference :
http://en.wikipedia.org/wiki/Unicode_and_HTML
Thanks