SMS

What is smart encoding, and when does it not help?

Smart encoding substitutes simpler characters before sending a text, but leaves it unchanged if any character still needs the wider alphabet.

A word processor can turn a straight apostrophe into a curly one when you paste a notification. That small change can force the entire text into a less compact encoding.

Plain Latin text fits 160 characters in one segment, a billable part of a message. A curly apostrophe switches the whole text to a wider alphabet with room for 70. Bird calls these encodings GSM-7 and UCS-2.

What does smart encoding replace?

Bird replaces supported punctuation, spacing and presentation variants with characters that fit GSM-7.

Curly quotes become straight quotes. Typographic dashes become hyphens. Non-breaking spaces become ordinary spaces. A single ellipsis character becomes three periods. The smart encoding guide lists the replacements.

Bird does not generally remove accents from letters. It leaves á as á, preserving the spelling. GSM-7 already includes à, ä, å, é, è, ì, ò, ù, ö, ñ and ü. Those letters need no replacement. It does not include á, í or ú.

Why does the body sometimes stay unchanged?

Bird applies replacements only when the entire resulting body fits GSM-7 and remains nonempty.

If an emoji or an unsupported accented letter survives, Bird sends the original text. A body containing both a curly quote and á therefore keeps both characters. Replacing only the quote would still leave the message in UCS-2.

How your editor stores an accent can change the result. An ê stored as one character remains unchanged. An e followed by a separate circumflex accent looks identical, but can become e^. That replacement applies only if the whole result fits GSM-7.

Does smart encoding always reduce the cost?

No, because some substitutions make the text longer.

Seventy ellipsis characters fit one segment. Replacing each with three dots produces 210 characters. That exceeds the 160-character single-segment limit and needs two parts, each allowing 153 characters.

For ordinary punctuation mixed into longer words, the result can go the other way. A body of 150 Latin letters plus a curly apostrophe contains 151 characters. It needs three parts at the 67-character multipart allowance. Replacing the apostrophe lets those 151 characters fit one GSM-7 segment.

The billed quantity is the segment count of the resulting text. SMS segments explains those capacities.

Can it shorten an oversized message enough to send?

It can bring the encoded size below Bird's cap. It never truncates the text.

Bird checks the twelve-segment limit after applying smart encoding. A body still exceeding that limit receives HTTP 422, a rejection for invalid content. A body already in GSM-7 passes through unchanged.

How do I enable smart encoding in Bird?

You set the option on each send. Compare the returned message with your submitted text to inspect the result.

  • options.smart_encoding accepts true or false and defaults to false. The response reports the setting that applied.
  • text is the resulting nonempty string, except that authentication messages return **REDACTED** to protect their passcodes. A free-text request must fit the twelve-segment cap.
  • segments.encoding is GSM_7BIT or UCS2.
  • segments.count is an integer of at least 1. Each counted segment is billable. Outgoing messages are capped at 12.

A true setting with UCS2 means the conversion did not produce a usable GSM-7 body. Check the characters in the final text before changing the setting again.

When should I enable it?

Enable it when the documented substitutions preserve your intended text and the resulting segment count suits your message.

Compare templates with their actual inserted names and product descriptions. Keep the option disabled when exact punctuation or character representation matters. The segment calculator helps check encoded length before sending.

In short

  1. Replacement applies to the complete body.

    Bird keeps the original text if any unsupported character remains after replacement.

  2. Accented letters are not generally simplified.

    An unsupported accented letter such as á prevents the replacement from applying.

  3. Each send requires an explicit setting.

    The smart encoding option accepts true or false and defaults to false.

  4. Check the resulting text and segment count.

    Replacements can expand the text, so changing the encoding does not guarantee fewer segments.

Build on the same network.

A test API key is yours immediately. Production unlocks when you add a payment method and verify a sender.

Your next idea.
Ready to connect.