← Back to context

Comment by acuozzo

10 months ago

140 and 160 are related when it comes to SMS.

The GSM-7 alphabet is the most common one in use with SMS (or, at least, it was as UCS-2 is more common now with emojis and such).

160 is the number of GSM-7 characters.

160*7/8 = 140 which is the number of bytes in the userdata portion of the TPDU.

I don't think the Twitter choice of 140 was anything to do with this though and is just a coincidence. Back during dumbphones the only way to receive tweets while mobile was via the texting interface, and it would want to prepend the username. I don't think reserving 20 for the username has anything to do with how many bits are used to represent the alphabet.

That's coincidence, though. I used Twitter to keep in touch with friends via SMS in 02008, and the messages had space for a prelude to say who they were from. In the opposite direction, you could use that space to tell Twitter to send the message privately to someone.