encoding

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidByte = errors.New("invalid gsm7 byte")

ErrInvalidByte means that a given byte is outside of the GSM 7-bit encoding range.

This can only happen during decoding.

View Source
var ErrInvalidCharacter = errors.New("invalid gsm7 character")

ErrInvalidCharacter means a given character can not be represented in GSM 7-bit encoding.

This can only happen during encoding.

Functions

func GSM7

func GSM7(packed bool) encoding.Encoding

GSM7 returns a GSM 7-bit Bit Encoding.

Set the packed flag to true if you wish to convert septets to octets, this should be false for most SMPP providers.

func ValidateGSM7Buffer

func ValidateGSM7Buffer(buffer []byte) []byte

Returns the bytes, in the given buffer, that are outside of the GSM 7-bit encoding range.

func ValidateGSM7String

func ValidateGSM7String(text string) []rune

Returns the characters, in the given text, that can not be represented in GSM 7-bit encoding.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL