mwunsch / rumoji

Encode and decode emoji unicode characters into emoji-cheat-sheet form.
http://mwunsch.tumblr.com/post/34721548842/we-need-to-talk-about-emoji
MIT License
180 stars 71 forks source link

Wrong emoji #17

Closed casertap closed 9 years ago

casertap commented 9 years ago

In my db I have the sad emoji Image of sad

But using this code:

emojify(Rumoji.encode(comment.content))

I get this emoji displayed Image of the wrong emoji

Usually it work but not for the decoding of this smiley (Have been using the plugin for 2 weeks so I may find other wrong smiley in the future)

Here is the information I could get about the smiley in db: Image info

mwunsch commented 9 years ago

This does not appear to be a bug in Rumoji:

comment = "oh no!!😢"
Rumoji.encode(comment)
#=> "oh no!!:cry:"
Rumoji.decode(Rumoji.encode(comment))
#=> "oh no!!😢"
Rumoji::Emoji.find(:cry).hex
#=>"1F622"

Would seem to me that emojify might be the culprit here