Documentation ¶
Overview ¶
Package pdutext provides text conversion for PDU fields.
See 2.2.2 from http://opensmpp.org/specs/smppv34_gsmumts_ig_v10.pdf for details.
pdutext supports Latin1 (0x03) and UCS2 (0x08).
Latin1 encoding is Windows-1252 (CP1252) for now, not ISO-8859-1. http://www.i18nqa.com/debug/table-iso8859-1-vs-windows-1252.html
UCS2 is UTF-16-BE. Here be dragons.
TODO(fiorix): Fix this.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Codec ¶
type Codec interface { // Type returns the value for the data_coding PDU. Type() DataCoding // Encode text. Encode() []byte // Decode text. Decode() []byte }
Codec defines a text codec.
type DataCoding ¶
type DataCoding uint8
DataCoding to define text codecs.
const ( // DefaultType DataCoding = 0x00 // SMSC Default Alphabet // IA5Type DataCoding = 0x01 // IA5 (CCITT T.50)/ASCII (ANSI X3.4) // BinaryType DataCoding = 0x02 // Octet unspecified (8-bit binary) Latin1Type DataCoding = 0x03 // Latin 1 (ISO-8859-1) // Binary2Type DataCoding = 0x04 // Octet unspecified (8-bit binary) // JISType DataCoding = 0x05 // JIS (X 0208-1990) ISO88595Type DataCoding = 0x06 // Cyrillic (ISO-8859-5) // ISO88598Type DataCoding = 0x07 // Latin/Hebrew (ISO-8859-8) UCS2Type DataCoding = 0x08 // UCS2 (ISO/IEC-10646) )
Supported text codecs.
Click to show internal directories.
Click to hide internal directories.