For example, in Emoji Char set, U+1F601 is the unicode value for "GRINNING FACE WITH SMILING EYES", and \xF0\x9F\x98\x81 is the UTF-8 bytes value for this character.
\xE2\x9D\xA4 is for heavy black heart, and the unicode is U+2764.
So my question is, if I have a byte array with value (0xF0, 0x9F, 0x98, 0x81, 0xE2, 0x9D, 0xA4), then how I can convert it into Unicode value?
For the above result, what I want is a String array with value "1F601" and "2764".
I know I can write a complex method to do this work, but I hope there is already a library to do this work.
String.codePointAt()in addition the producing theStringas explained in the answers.UTF-8values into theunicode? When I use the code below, it gives me the emoji instead of theunicodevalues such asU+1F601. @XWang