Presence of Emoji affecting index of entities


#1

I’m new to the Twitter API and development in general, so please forgive me if this is an obvious question.

I’m attempting to linkify all entities in the tweets I’m getting over the NodeJS streaming API. But whenever a tweet’s text contains emoji, each emoji is taking up more than one character space in the text (between 2 and 4), and so the indices of the entities that are given in the tweet object are off. This is preventing me from programmatically wrapping the entities in appropriate HTML tags.

Can anyone tell me what’s going on here?


#2

Not sure, but you could take a look at the twitter-text package, which is the code we use to linkify text in Tweets.