i need to create a String with a country flag unicode emoji..I did this:
StringBuffer sb = new StringBuffer(); sb.append(StringEscapeUtils.unescapeJava(\"\\\
You should be able to do that simply using toChars from java.lang.Character.
toChars
java.lang.Character
This works for me:
StringBuffer sb = new StringBuffer(); sb.append(Character.toChars(127467)); sb.append(Character.toChars(127479)); System.out.println(sb);
prints