Matt Vukas Matt Vukas - 22 days ago 19
Javascript Question

Issue displaying Emoji Unicode characters pulled from Twitter API on a web app

I'm currently developing a web app that pulls tweets from the Twitter API and displays them on a website. For reference, I'm using Google Chrome on Mac OS X 10.9 to test it.

I've noticed that certain tweets with Emoji emoticons display as squares, or the icon for "unrecognized character". Which originally led me to believe that data was being garbled somehow by the backend. But when I copy into or display the characters using a Mac system font...

Selecting and right clicking the unknown characters

So what's going on here, and what would be the best way to handle it? I'm using Google's Open Sans font on my site, if that matters, but I've tried a few fonts to no avail.

Answer

This is a limitation of Chrome.

Chrome for Android and iOS should display them fine. For Mac and Windows there is an extension to display these emojis in-browser.

Of course that won't solve the problem for anyone else who doesn't have the extension, but in that case there really isn't much you can do short of manually replacing them with your own images, as Twitter does.

Comments