I found this Q&A : Detect when a unicode character cannot be displayed correctly
But it's not in Java.
I have the following code :
int codePoint=Integer.parseInt(unicodeText,16);
byte eBytes[]=new String(Character.toChars(codePoint)).getBytes(StandardCharsets.UTF_8);
String str=new String(eBytes,Charset.forName("UTF-8"));
JButton button=new JButton(str);
It can display unicode image on a JButton like this :
So if you set unicodeText to something like "1F602", it can display an image on a button.
My questions are :
<1> I tried both Java 8 and Java 12, result is the same, they are missing the same images from certain unicodes, why ? What can be done to make the missing images show up, seems Java upgrade didn't do it.
<2> How can I detect from my Java app which unicodes can't not be displayed ?