Support for Emojis
Re: Support for Emojis
Storage is fine but none of the librairies support skin tone variants for the emoji.
-
- Registered User
- Posts: 15
- Joined: Fri Sep 11, 2015 12:55 pm
Re: Support for Emojis
Yep:
👨🏻
👨🏼
👨🏽
👨🏾
👨🏿
What's the reason we're using libraries such as Twemoji here? All major OSs support emoji now and have their own set, meaning it would probably be easier to store the characters as such (using utf8mb4) and not worry about parsing them. That would not only allow compliance with the specifications but also mean that the emoji you type in the text field remains the same (for you) after submitting your post, instead of being replaced with some variant.
👨🏻
👨🏼
👨🏽
👨🏾
👨🏿
What's the reason we're using libraries such as Twemoji here? All major OSs support emoji now and have their own set, meaning it would probably be easier to store the characters as such (using utf8mb4) and not worry about parsing them. That would not only allow compliance with the specifications but also mean that the emoji you type in the text field remains the same (for you) after submitting your post, instead of being replaced with some variant.
- DavidIQ
- Customisations Team Leader
- Posts: 1905
- Joined: Thu Mar 02, 2006 4:29 pm
- Location: Earth
- Contact:
Re: Support for Emojis
From the first post:Hunchman801 wrote: Wed Feb 17, 2016 11:03 amWhat's the reason we're using libraries such as Twemoji here? All major OSs support emoji now and have their own set, meaning it would probably be easier to store the characters as such (using utf8mb4) and not worry about parsing them. That would not only allow compliance with the specifications but also mean that the emoji you type in the text field remains the same (for you) after submitting your post, instead of being replaced with some variant.
rfdy wrote: Wed Apr 22, 2015 8:39 pm
- Because emojis are not consistent across browsers and support for it is lacking in some browsers (ie. Emojis are all black/white in Mozilla Firefox), we use the Twitter Twemoji library (https://github.com/twitter/twemoji) to convert emoji characters to standardized images.
-
- Registered User
- Posts: 15
- Joined: Fri Sep 11, 2015 12:55 pm
Re: Support for Emojis
Just tried in Firefox 44.0.2 on OS X 10.11 and they show up fine. What versions/OSs are concerned?
- DavidIQ
- Customisations Team Leader
- Posts: 1905
- Joined: Thu Mar 02, 2006 4:29 pm
- Location: Earth
- Contact:
Re: Support for Emojis
The emoji set differs between pretty much all operating systems be it iOS, OSX, Android, Windows, and Unix distros. Even between different versions of each of those systems the emoji set can be different.
Re: Support for Emojis
Just an example: for me (Ubuntu 14.04 + firefox or chrome) they are all black and white and only a small subset can be displayed.
Member of the phpBB Development-Team
No Support via PM
No Support via PM
-
- Registered User
- Posts: 15
- Joined: Fri Sep 11, 2015 12:55 pm
Re: Support for Emojis
Them being different is no issue, it's when they're not supported that it becomes a problem.DavidIQ wrote: Wed Feb 17, 2016 2:09 pm The emoji set differs between pretty much all operating systems be it iOS, OSX, Android, Windows, and Unix distros. Even between different versions of each of those systems the emoji set can be different.
Thanks for your input, with this in mind it makes sense to use images.Nicofuma wrote: Wed Feb 17, 2016 2:35 pm Just an example: for me (Ubuntu 14.04 + firefox or chrome) they are all black and white and only a small subset can be displayed.
In the future this might be supported everywhere though; how does TextFormatter store them? Did you guys switch to utf8mb4 or do you use XML entities?
Re: Support for Emojis
Stored as XML entities, displayed as UTF-8 characters.
☺
-
- Registered User
- Posts: 15
- Joined: Fri Sep 11, 2015 12:55 pm
Re: Support for Emojis
Which are replaced with images when applicable, right?
Speaking of which, how easy is it to configure TextFormatter to use a set of images other than Twemoji (or EmojiOne for that matter)?
Re: Support for Emojis
Replaced where applicable, yes.
You can replace the default XSLT template using the configurator from the
You can replace the default XSLT template using the configurator from the
core.text_formatter_s9e_configure_after
event. Something like that should work:Code: Select all
$event['configurator']->tags['EMOJI']->template = '<img alt="{.}" class="emoji" draggable="false" width="16" height="16" src="//twemoji.maxcdn.com/16x16/{@seq}.png"/>';