Collapse the table of content
Expand the table of content
Expandir Minimizar
Este conteúdo não está disponível em seu idioma, mas aqui está a versão em inglês.

Windows automatically selects optimal character encoding

Updated: August 27, 2013

Applies To: Windows 8, Windows 8.1

Windows 8 and Windows 8.1 chooses the optimal character encoding to use when it sends a SMS message, based on the most efficient encoding that is supported by the message contents. SMS is encoded in a 7-bit character set, unless it contains at least one invalid character, in which case the whole message is encoded in Unicode.

JavaScript code example for sending SMS messages using text-mode interface

    if (smsDevice != null)
      // defines a text message
      var smsMessage = new Windows.Devices.Sms.SmsTextMessage(); = id("phoneNumber").value;
      smsMessage.body = id("messageText").value + "\n\nSent via Windows 8 SMS API";
      var sendSmsMessageOperation = smsDevice.sendMessageAsync(smsMessage);
      console.log("Sending message...");
      sendSmsMessageOperation.then(function (reply)
        console.log("Text message sent.");
      console.log("No SMS device found");
} catch (err) {
    console.log("SMS exception: " + err);

Optionally, you can override the optimal encoding functionality and specify which character set to use.

Windows 8 and Windows 8.1 supports common character sets for mobile broadband network adapters that are compatible with GSM (3GPP) and CDMA (3GPP2) networks.

The following table lists the character encodings supported by the text-mode API:


Network type Character sets Character limit for single SMS segment Character limit for multi-part SMS segments


GSM 7-bit default alphabet and GSM 7-bit default alphabet extension table




7-bit ASCII

160 (can vary by network)



70 (can vary by network)

GSM character sets are defined 3GPP TS 23.038: "Alphabets and language-specific information". CDMA character sets are defined in 3GPP2 C.R1001-D.

See Also

© 2015 Microsoft