I have a android app, which messages workds with emoji. Saved message with emojis is diaplayed ok on android after fetching from mysql via json. Now I want to display same message with emojis on web script. Found JS lib https://github.com/iamcal/js-emoji but cant make it work. Anyone has a ready to use implementation of it? Sample db record look like this:
Unii \uD83D\uDE02\uD83D\uDE03\uD83D\uDE2E\uD83D\uDE25\uD83D\uDE23\uD83D\uDE0F
These are android emojis. Hot make the work on web?
Figured it out. The basic configuration from https://github.com/iamcal/js-emoji is enough to make js script to work. The problem was the string encoding. Android uses "Unicode escape sequences" to store specials characters in strings. It works great on mobile, but php has issues with it. Therefore we need to convert Unicode escape sequences with php working version. The converted version of previous db rec
Unii \ud83d\ude02\ud83d\ude03\ud83d\ude2e\ud83d\ude25\ud83d\ude23\ud83d\ude0f
Php convert functions can be found @ How to decode Unicode escape sequences like "\u00ed" to proper UTF-8 encoded characters?
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments