2-Way SMS response text broken at < 160 characters | Search |
NowSMS Support Forums ⬆ NowSMS Support - SMS Issues ⬆ Archive through January 23, 2007 ⬆ |
◄ ► |
Author | Message | |||
Adam Block New member Username: Ablock Post Number: 16 Registered: 10-2006 |
Hi. I am using 2-Way SMS and generating a plain text response for the gateway's HTTP request. As expected, when this response is longer than 160 characters the gateway is cutting it up into multiple messages before forwarding the text back to the original sender. However, the gateway appears to be cutting the text every 153 characters as opposed to every 160. Any idea why this would be? /afb | |||
Malcolm - Now Support Moderator Username: Malcolm Post Number: 110 Registered: 12-2006 |
Hi Adam, An SMS message can contain 140 bytes of data. A byte contains 8 bits, which means that a single SMS message can contain 8 x 140 = 1120 bits of data. When you send a text message, each text character is represented by 7 bits of data. 160 characters are allowed because 7 x 160 = 1120. To facilitate sending a text message longer than 160 characters, the text is split across more than one actual SMS message. However, you cannot fit 160 characters in each SMS message segment, because control codes need to be inserted in each segment to allow the receiving device to recognise that the message is segmented, and allow it to be reassembled. 6 bytes (8-bit) of control characters are required for each segment. This overhead leaves you with capacity for 153 characters (7-bit) per SMS message segment. -- Malcolm Now Wireless Support | |||
Adam Block New member Username: Ablock Post Number: 17 Registered: 10-2006 |
Interesting. Good to know. Thanks for the information. /afb |