Unicode to string conversion in Java

To convert the given Unicode to an character:
i.e String unicode = “0”+91+D1+””; to a Unicode character

Following method can use in Java

char getUnicode(String codePoint) {
   return (char)  Integer.parseInt(codePoint, 16);

String string = "0061";
char c = (char) Integer.parseInt(string, 16);

Create a free website or blog at WordPress.com.

%d bloggers like this: