How to convert UTF16 (emoji) to HTML Entity (hex) using java
I have the string from DB like this \"\\uD83D\\uDE02\".
I try to display this unicode emoji, it displays
Although the string appears to contain two Unicode characters, it's already one character encoded in UTF-16, that's how Java strings work. You can determine the actual UTF-16-decoded character code using the String.codePointAt method. Here the character's code is 0x1F602, which is Unicode 'FACE WITH TEARS OF JOY':