Character encoding allows for the representation and transmission of characters according to an encoding system. It's necessary for the accurate transmission of the incredibly diverse characters and symbols used to communicate by text messages all over the world.
There are two character encoding standards available on CALLR:
- The GSM standard offers a basic character set and is the most cost-effective.
- The Unicode standard: is much more flexible but more costly to use.
Supported characters using GSM
The full table of characters supported in the GSM encoding is available on Wikipedia.
Characters limits for GSM
Any text below 160 characters is counted as one SMS.
For texts longer than 160 characters, one SMS is counted every 153 characters (7 characters are used for smooth concatenation).
Supported characters using UNICODE
Unicode represents most of the characters used in common languages. Unicode is frequently updated to amount for previously uncovered needs. As of today, there are 128 000 Unicode characters. The full table of characters supported in the UNICODE encoding is available on Wikipedia.
Characters limits for UNICODE
Any text below 70 characters is counted as one SMS.
For texts longer than 70 characters, one SMS will be counted every 67 characters (3 are used for smooth concatenation.
Force character encoding
Using our API, you can force a specific encoding, using the “force_encoding” option in the ‘SMS.options’ object: It enables the automatic non-GSM character conversion. (ê –> e). More information on our API docs for SMS.
Text formatting in SMS (API)
The body of text messages is a string, therefore, basic string formatting options can be used:
- Newline character (\n) is interpreted and produces a new line in the received text.
- Tabs are not rendered (carrier level restrictions), but spaces in the string are respected if they are not at the beginning of the message.
" Hello Bob" is displayed on the recipient phone as "Hello Bob" but
"Hello Bob here is your package number" is displayed as it is in the string.
SMS concatenation merges messages that are longer than one SMS length. Some (amount varies with encoding) hidden characters are necessary to ensure the concatenation of SMS. They are the continuation prefix and a sequence number of subsequent SMS messages.
Maximum length of a concatenated SMS
The SMS protocol is limited to up to 16 SMS concatenated together (the UDH header that joins the messages is a hex value). Therefore, a single concatenated SMS can contain up to:
- GSM encoding: 2448 characters (16 x 153)
- UNICODE encoding: 1072 characters (16 x 67)