Twitter Bug: Truncates 140-Character Tweets (UPDATED for why it happens)

Thought I’d snap off a quick blog post. I’ve been seeing a problem on Twitter where my longer tweets were being truncated at 130 characters. For example, this 140-character tweet got cut off mid-word.

Love this post by Atlassian’s @barconati Connectbeam Connects | Confluence Customers Beam >> why E2.0 integrati …

I did a bit of QA on-the-fly on Twitter. I found that tweets of 137 and 139 characters were just fine. It was only the exactly 140-character tweets that were being truncated.

A couple fellow tweeters participated in the QA. Nathan Bobbin (@nbobbin) got the same problem. But Jacqueline (@laikas) was just fine with her 140-character tweets.

So you may not be seeing this bug. But if you are, a simple solution is to limit tweets to 139 characters. A bit of forced brevity, eh?


UPDATE: There is an answer for this problem, courtesy of GetSatisfaction user Eridanus. Apparently special characters are stored by Twitter as more than one character. So you think you’re righting 140 characters, but it’s actually longer as far as Twitter is concerned. In the tweet above, I used the characters: >>. Here’s what Eridanus had to say:

Tweet No. 1:
Reading: Confluence 2.10 – Just in time for the Holidays >> Cool widget connectors (Flickr, SlideShare, YouTub ……

Tweet No. 2:
Love this post by Atlassian’s @barconati Connectbeam Connects | Confluence Customers Beam >> why E2.0 integrati ……

In both cases, the > is the special character, which is represented as a so-called HTML entity:

> is represented internally as & gt ;
< is represented internally as & lt ; (but without the spaces)

(I had to include spaces in the entities to prevent Get satisfaction “obligingly” converting them into the characters).

So >> looks like 2 characters, but actually requires as much space as 8 normal ones (i.e. 6 more characters than you’d expect).

And then Twitter wastes a few characters for the ellipses …..! – making up the usual 140.

Crowdsourced answer. Awesome.


See this post on FriendFeed:


About Hutch Carpenter
Chief Scientist Revolution Credit

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: