3 ms·
This seems completely backwards to me: > Do not store emoji unicodes in your database. Store the human-friendly code and support the emoji-cheat-sheet. I woul
by acdha 14y ago
This seems completely backwards to me:
> Do not store emoji unicodes in your database. Store the human-friendly code and support the emoji-cheat-sheet.
I would strongly recommend doing the reverse: store and use standard Unicode throughout your application. If you want support on browsers which do not support Unicode 6 properly, use JavaScript or a web font to substitute the characters in question so you don't need to update every bit if text you've ever stored or displayed when e.g. Chrome lands emoji support in a few releases.
This approach avoids having to fix your proprietary encoding scheme later and also means that less popular user agents automatically get support as soon as they add it.
- mwunsch 14y agoI agree in principal, but in practice no such font is widely available. The emoji cheat sheet has emerged because a desire to use emoji exists, but both input and display are not well supported. The solution I propose, albeit imperfect, works today to display emoji input to those who would not otherwise see it.
- acdha 14y agoThere is at least one open font (Symbola) with emoji support and I thought Ubuntu had been adding support at some point recently. More to the point, however, you could take the symbols you would have to create either way and package them as a web font - which would only be downloaded on devices without a better choice - or simply make your JavaScript do a simple search and replace on the Unicode character values to substitute the same HTML markup you'd need either way. Again, you could do a client side detection for this to avoid any overhead on browsers with support.