Skip to main content

Module encoding

Module encoding 

Source
Expand description

Encoding and decoding utilities (GSM 7-bit, etc.).

§Content Encoding/Decoding Module

This module contains encoding/decoding logic for message content

Enums§

MessageBody
Represents the body of a Short Message, either Text or Binary.

Functions§

decode_8bit
Decodes 8-bit Latin1 (ISO-8859-1) data into a String.
decode_16bit
Decodes 16-bit UCS-2 (Big Endian) data into a String.
encode_8bit
Encodes text into 8-bit Latin1 (ISO-8859-1). Replaces unsupported characters with ‘?’.
encode_16bit
Encodes text into 16-bit UCS-2 (Big Endian).
gsm_7bit_decode
Decodes GSM 7-bit data (unpacked) into a String.
gsm_7bit_encode
Encodes text into GSM 7-bit packed format (unpacked representation).
process_body
Processes the raw message body based on Data Coding Scheme (DCS) and UDHI flag. Returns a MessageBody which is either Text (if decodable) or Binary.