Encoding SMS and MMS Messages

Follow

Molly Katolas

Updated

Q: How does Bandwidth encode its SMS messages?

A: Bandwidth adopts the following practices  -

  • On SMPP - Bandwidth always passes through the encoding type present in the message both for MT and MO messages.
  • On HTTP Messaging V2 -
    • For MT messages [outbound from Bandwidth customer to end users], Bandwidth uses GSM 8-bit encoding, or UCS-2, if the message text contains non-ASCII characters.
    • For MO messages [inbound to Bandwidth customer from end users] received via HTTP callback, message text will always be in JSON format with UTF-8 encoding.
  • On HTTP Messaging V1 -
    • For MT messages, Bandwidth will select the smallest encoding that can represent the message text. The set of possible encodings, from smallest to largest is: GSM → Latin1→ Cyrillic → Hebrew → UCS2.
    • For MO messages received via HTTP callback or the API, message text will always be in JSON format with UTF-8 encoding.

 

Q: How does Bandwidth encode its MMS Messages?

A: Bandwidth adopts the following practices  -

On MM4 - Bandwidth always passes through the encoding type present in the message both for MT and MO messages.

On HTTP Messaging V2 - All messages are sent and received as UTF-8.

On HTTP Messaging V1 -All messages are sent and received as UTF-8.

 

Q: What is the expected length of SMS messages?

A:  The final message length in characters depends on the encoding.  For the two most common formats  -

GSM - The message length is up to 160 characters

UCS-2 -  The message length is up to 70 characters

For multi-part or concatenated messages, some additional information needs to be stored in each message and so the number of characters may get reduced

For more general info on these formats go to these links - GSM; UCS-2

 

Q: What is the expected length/size of MMS messages?

A: The HTTP API limits messages to a maximum length of 2048 characters. The size of MMS messages including text, all attachments, and some overhead for Base64 encoding, has a maximum limit of 5 MB.

Article is closed for comments.