- Jun 6, 2020
- 11,517
- 4,383
In searches, I've come across a fair few people wondering how to detect if a message is just emoji so that, like WhatsApp, it can be displayed in a larger font if necessary. So I thought I'd share my solution to this.
Background: all the messaging between apps and site users goes through the website database. The database stores everything in UTF8, but for emoji, we convert them to shortcodes and store those, so a smiley may be represented in the database as "?"
We use
So, in the next app update I want to detect short messages containing emoji and display them in a bigger font. Rather than try and do this client-side, it's done on the server using PHP's multibyte string support. First I check if...
Background: all the messaging between apps and site users goes through the website database. The database stores everything in UTF8, but for emoji, we convert them to shortcodes and store those, so a smiley may be represented in the database as "?"
We use
برای دیدن لینک ها باید ثبت نام کنید
to provide emoji support on the website, and depending on what app (we have some old Windows & Mac ones with no emoji support), it can convert between the shortcodes and either unicode, links to web images, or even ascii versions.So, in the next app update I want to detect short messages containing emoji and display them in a bigger font. Rather than try and do this client-side, it's done on the server using PHP's multibyte string support. First I check if...
برای دیدن لینک ها باید ثبت نام کنید
برای دیدن لینک ها باید ثبت نام کنید