iamcal / php-emoji Goto Github PK
View Code? Open in Web Editor NEWA PHP Emoji conversion library
License: MIT License
A PHP Emoji conversion library
License: MIT License
I use emoji_unified_to_html
When I convert ❤️️ I have as result :
<span class="emoji-outer emoji-sizer"><span class="emoji-inner emoji2764"></span></span>️️
with some residual data : EF B8 8F EF B8 8F
This emoji is supported by this replacement :
"\xe2\x9d\xa4"=>"<span class=\x22emoji-outer emoji-sizer\x22><span class=\x22emoji-inner emoji2764\x22></span></span>",
but it seems that ❤️️ = \xe2\x9d\xa4\xef\xb8\x8f\xef\xb8\x8f
not only \xe2\x9d\xa4
Can you add a composer.json and add to Packagist?
From an email conversation with 杜志刚:
On 3/27/2011 9:23 PM, 杜志刚 wrote:
Please see
http://www.unicode.org/~scherer/emoji4unicode/snapshot/full.html#e-82C (e-82C
~ e-837)
There are BAD multiple code points :|| num ||chr|| first || second || || e-82C || # || U+0023 || U+20E3 || || e-82E || 1 || U+0031 || U+20E3 || || e-82F || 2 || U+0032 || U+20E3 || ... || e-837 || 0 || U+0030 || U+20E3 ||
The second code is BAD !
Ahhh! Now I understand what's happening here. U+20E3 is 'COMBINING ENCLOSING KEYCAP' and it draws a box around the character that comes before it, so the sequence "U+0032 U+20E3" displays a '2' in a square box, which is what we want. I think I want to modify the parser to use the sequence of 2 unicode codepoints instead of just one or the other.
The problem with using the first one is that it replaces characters where you don't expect it to - it will replace any numbers in text with the numbers-in-boxes emoji, which is almost never what you want (and the reason I changed it to begin with).
--cal
Now the emoji picture size is 7,352KB
It's too large to download it when the web load the srouces.
I think split every emoji as one picture is better.
The using emoji_contains_emoji I noticed a number of maybe false positives, it's up for debate as you could use many of these symbols as emoji. Since I was working with a larger source of user generated content I opted to retrieve valid sources of emoji and Unicode characters. The following is the test scripts.
https://github.com/charlesverge/emoji-php-comparsion
Two examples are
Detected as emoji ⤂
Not detected 3️⃣ as emoji
Not sure if any thing should be changed other than adding a few more emoji into the data set as the false positives for the most part look fine as emoji.
Hi @iamcal
I noticed that "http://www.unicode.org/~scherer/emoji4unicode/snapshot/full.html" is outdated and dosen't contains all emoji available in gemoji. I checked also emoji-data which is based on the same file "full.html" but also on "http://www.unicode.org/Public/UNIDATA/UnicodeData.txt" which is updated with all the missing emoji.
my request is : could you please integrate the same process of emoji-data in php-emoji in order to generate a map with the latest emoji
thanks
Why there is no emoji_name_to_unified function?
I can't understand.
function emoji_name_to_unified($name){
return array_flip($GLOBALS['emoji_maps']['names'])[$name];
}
Hi everybody, I am trying to send pushnotification for ios app.
end I am having a problem to send emoji on this push.
I have this text on my database:
"\ue415 Vei na boa vou dar um tiro nesse push"
when I try to send this message to APN(https://github.com/duccio/ApnsPHP) it arrives
"? Vei na boa vou dar um tiro nesse push"
Someone know how can I convert this?
Could you kindly introduce new emoji in iOS 6 into this project?
Or where can I get the information about that?
Thanks for your hard work on this.
What is the legal status of the images used for these emoticons? Are these taken directly from iOS or are they from some other source? Are they GPL licensed?
I downloaded and included it.. all i did was:
include('php-emoji-master/emoji.php');
at top of the document and
while ($ergebnis->fetch())
{
for($i=0;$i<count($badword);$i++){if(strtolower($result['name'])==$badword[$i])$result['name']='Honk :o)';$result['text']=str_ireplace($badword[$i],'***',$result['text']);}$result['text']=str_ireplace('pbadwordword','password',$result['text']);
$result['text']=filterbburl(make_clickable(emoji_unified_to_html(filter($result['text']))));
print($result['text']);
}
Fatal error: Cannot redeclare emoji_docomo_to_unified() (previously declared in C:\inetpub\wwwroot\de_DE\chat\php-emoji-master\emoji.php:2055) in C:\inetpub\wwwroot\de_DE\chat\php-emoji-master\emoji.php on line 30
Any way to get around this? I need to have the loop, $result['text'] is the text in my database.
Thanks you for this amazing library.
Is there any emoji picker that corresponds with this library?? I mean the picker that produce the exact span
? (Then I can convert it to native emoji with this library)
I noticed in the master branch, there is no background-position in emoji.css for this emoji.
If you refer to http://code.iamcal.com/php/emoji/, it's a "?" symbol (probably because the icon hasn't been extracted?).
I found this repo in https://packagist.org/packages/iamcal/php-emoji
But now there is only "dev-master" version is valid.
maybe you should check the repo's "Integrations & services" page.
emoji1f610 appears slightly wrong positioned.
Changing css to .emoji1f610 { background-position: 65.1% 75% !important; }
solves it.
It looks like the image file of this project is not optimized for retina screens
Parsing posts from twitter. Sometimes it adds extra emoji after some twitters emojis. I store data in MySQL with utf8mb4_general_ci collation
Hey folks,
I am sending camera emoji in push notification. I have defined the following code for sending apns:
"\uD83D\uDCF7 Image"
The use of this code is successful and i can easily watch the camera icon in the payload . See below:
I can see the camera image but when receiving the push notification, it shows:
?? image
Please help me on this
I am implementing push notifications on my php server using APNS-PHP (https://github.com/duccio/ApnsPHP). I have emoji hard-coded in my php code like this...
$message = "\xf0\x9f\x93\x85" . "This is an emoji";
// do the apns-php stuff here.
Instead of the emoji, I am getting a "?" question mark.
?This is an emoji.
Then I tried using following:
$message = emoji_unified_to_softbank("\xf0\x9f\x93\x85") . "This is an emoji";
Instead of emoji, this showed the Japanese characters for the particular emoji (calendar)....
[カレンダー]This is an emoji.
Is there a workaround for this when using APNS-PHP?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.