Below is the method for returning the decimal entity.........
public static String getHTMLEntity(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();
}
OUTPUT for "सड्फलक्ल क्लजकलसदफ क्ळज्सलड्फ"
सड्फलक्ल क्लजकलसदफ  क्ळज्सलड्फ
No comments:
Post a Comment