Skip to content Skip to sidebar Skip to footer

How To Convert Html Entities In Java

I got some strings like Bình Định, Cà Mau (which supposed to be 'Bình Định', 'Cà Mau') what should I do to print them out as 'Bình Định', 'Cà mau'? I

Solution 1:

Is this what you're looking for?

int target = 236;
char[] unicodeCharPair = Character.toChars(target);
System.out.println("Char: " + new String(unicodeCharPair));
// Char: ì

Solution 2:

Use the getBytes() method for your coded format

Post a Comment for "How To Convert Html Entities In Java"