GSM-7

GSM-7 is the 7-bit alphabet for basic Latin text in SMS: 160 characters per segment, or 70 once the message switches to UCS-2.

Definitions only — a term explained here is not a service we sell.

GSM-7 is the 7-bit alphabet that SMS uses by default for Latin letters, digits and common symbols. Text inside it fits 160 characters in one segment; one character outside moves the whole message to UCS-2.

Encoding, units and segments

Encoding
GSM-7
Characters
20
Units
20
Segments
1
The figure reports the encoding, character count, encoding units and segment count for one message.
Text description

The figure runs one sample message through the segment counter and shows four fields: encoding, character count, encoding units and segment count. Units are septets in GSM-7 and 16-bit code units in UCS-2.

Why the count matters

3GPP TS 23.038 defines the alphabet: basic Latin letters, digits, common punctuation, a few accented letters such as é, ü, ñ and ç, and symbols such as £. An escape character adds curly braces, square brackets and the euro sign, at two septets each. A concatenated GSM-7 segment holds about 153 septets, not 160.

One character outside the table moves the whole message to UCS-2, from 160 characters per segment to 70. Escaping can also split a 160-character message. Normalize punctuation and test the text in the SMS segment calculator.

FAQ

Is GSM-7 the same as ASCII?

No. It overlaps with ASCII for basic Latin letters and digits, but has its own positions and extension set.

Does a newline count as one character?

Yes, line feed is in the default set. Carriage return plus line feed counts as two.

Can I force GSM-7?

You can keep content inside the alphabet. You cannot force a network to use it if the content needs UCS-2.

Learn more

Sources

  1. 3GPP TS 23.038: Alphabets and language-specific information