问题
I am having a Whatsapp chat txt file inside of which emojis have been replaced by such text------> "���"
I want to convert that text to specifics emojis. How can I do that and use it inside a java application?
回答1:
As @Abhishek pointed out, you need to use a different type of encoding. Whatsapp does backup with UTF-8 converting the emoticons into string representations. If you want to see the real emoji, you will have to use Unicode instead. Unicode contains sections which specify emoji as "characters". They're regular characters, you only need a font which can display them. Also see the Unicode Emoji FAQ.
In a text file, characters are basically encoded as numbers in the form of bytes. To display those visually on a computer screen you need a font which contains the visual glyph to render this character. Since the process is always numeric identifier → font → visible glyph, it should be pretty obvious that a "character" can be anything visual, including emoji or any other image.
回答2:
Maybe all you need is a a font which contains the visual glyph to render these characters. See this for reference.
来源:https://stackoverflow.com/questions/36790832/emoji-inside-whatsapp-chat