|All requests||>||Convert Emoji Charaters||>||Request new recommendation||>||Featured requests||>||No recommendations|
by piyush Saraf - 7 years ago (2015-05-06)
I would like a solution to replace emoji to the respective code.
12. by Dave Smith - 7 years ago (2015-05-11) Reply
I don't know what happened but my last comment didn't seem to save, so I will paraphrase in a new thread...
There is a php class from emojione that converts both ways, including smileys. It is under the MIT license, so it is free to post as long as the copyright and license remain. I don't want to support it, so would you like me to send you the php files and you can post it?
13. by Manuel Lemos - 7 years ago (2015-05-11) in reply to comment 12 by Dave Smith Comment
No, if it is not yours and you do not want to support it, do not submit it.
Maybe somebody else will submit a package for that purpose.
1. by Dave Smith - 7 years ago (2015-05-09) Reply
From what I have read, emoji is part of the unicode standard, mostly. So whenever you see an emoji image, there is a unicode character code in the source. Are you wanting to manipulate the source so that the code is displayed instead of the emoji image? or... are you wanting a system where someone can select an emoji to include in a message and the character code is written to the source of the message?
2. by Manuel Lemos - 7 years ago (2015-05-11) in reply to comment 1 by Dave Smith Comment
Right, Dave. If by emoji he means the Unicode characters, there seems to be no package for that.
On the other hand, if by emoji he meant actually emoticons. There are a few classes that replace the text by HTML image tags.
3. by Dave Smith - 7 years ago (2015-05-11) in reply to comment 2 by Manuel Lemos Comment
From my investigation, it seems that emoji has been around a lot longer than emoticons and has had its own coding before being adopted into unicode. There is a chart available to map the emoji code to unicode, so I was also curious as to whether we where talking about a class that could handle that conversion. I suppose we will never know unless the poster responds.
4. by Manuel Lemos - 7 years ago (2015-05-11) in reply to comment 3 by Dave Smith Comment
I thought emoticons were the image representation of emoji as icon images.
That said, I think it would be useful and innovative to have a class that would convert ASCII text (multiple characters) emoji to Unicode and vice-versa.
5. by Dave Smith - 7 years ago (2015-05-11) in reply to comment 4 by Manuel Lemos Comment
6. by Manuel Lemos - 7 years ago (2015-05-11) in reply to comment 5 by Dave Smith Comment
Yes, I think it should not be hard to create a class for that from scratch and submit it to PHP classes. It would be innovative, so the author would be nominated for the Innovation Award (wink, wink).
As for the icons, I did not mean to convert the emoticons images, but rather the text equivalents between the ASCII and Unicode, at least for those that can be converted to ASCII.
7. by Dave Smith - 7 years ago (2015-05-11) in reply to comment 6 by Manuel Lemos Comment
I actually caught the subtle innovative hint the first time, all my classes in queue are innovative :)
The problem isn't writing the code, it is mapping the shortnames to unicode. I read that there are 722 emoji in unicode 6, another 250 added in unicode 7, and reportedly more on the way. I suppose I could reverse engineer an open source map that is already out there.
8. by Manuel Lemos - 7 years ago (2015-05-11) in reply to comment 7 by Dave Smith Comment
I don't know if there are text equivalents for all those emogi. Maybe those that already have well known emoticons equivalents have also ASCII text equivalents. It would not make sense convert from ASCII to Unicode those that have no ASCII equivalents.
9. by Dave Smith - 7 years ago (2015-05-11) in reply to comment 8 by Manuel Lemos Comment
I think unicode is trying to keep up with emoji, not the other way around. I suspect there are thousands of shortnames, which really aren't that short, :person_with_blond_hair: for example, not to mention the duplicates, :+1: and :thumbsup: are the same. Certain applications support only some of the shortnames, and there does not appear to be any common thread between them. Whatever we map today, there will be 100 more, new and duplicate ones tomorrow.
10. by Manuel Lemos - 7 years ago (2015-05-11) in reply to comment 9 by Dave Smith Comment
Yes, I was just thinking of those that map to ASCII characters that look like the actual emoji image, like :-) .
11. by Dave Smith - 7 years ago (2015-05-11) in reply to comment 10 by Manuel Lemos Comment
I just checked out the developers package from emojione, they have a php class that manages conversions both ways, including a setting to convert the smileys that you are talking about. It is under the MIT license, so it is free to use as long as the copyright and license is included. No reason to reinvent the wheel. I can e-mail you the php portion of the package if you want to put it up, I really don't want to myself and wind up having to support it.
This new class is working with proper emoji characters in unicode. The available characters can also be easily updated to keep up with the ever changing emoji.
This convert some texts into IMG objects with the url you specify. Use CSS for specify the width and height and other values.
If by emoji you actually meant actually emoticons, this class can replace the text by HTML image tags using Yahoo messenger icons.
I think it would not be hard to change it to use other icons if you prefer.