kcthota / emoji4j

Java library to convert short codes, emoticons, html entities, emoticons to emojis and vice-versa
Apache License 2.0
200 stars 61 forks source link

emojify not working with multi symbol emojis #18

Open nudja opened 4 years ago

nudja commented 4 years ago

emojify does not reverse hexHtmlify for 3 and 4 character emojis e.g. EmojiUtils.emojify(EmojiUtils.hexHtmlify("👨‍👨‍👦‍👦") produces "👨‍👨‍👦‍" not "👨‍👨‍👦‍👦"

It is not replacing the joiner html encoding &#x200d.

(the github preview is converging the output back to the single emoji character so look at the original input)

(trying to expand what it actually produces as github preview is losing the expansion)

The following is what it produces (without the single quotes!)

EmojiUtils.emojify(EmojiUtils.hexHtmlify("👨‍👨‍👦‍👦") produces 👨'&#x200d'; '👨&#x200d';'👦&#x200d';👦'

Hope this can be fixed

hellomsg commented 4 years ago

maybe we should detect a emoji depend on the emoji data file rather than depend on a limited and embedded manually maintained json file.

hellomsg commented 4 years ago

Emoji are effectively unlimited in variety.