charset

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2020 License: MIT Imports: 0 Imported by: 4

Documentation

Overview

Package charset provides encoders and decoders for GSM character sets.

Index

Constants

View Source
const (
	// Default character set.
	Default int = iota
	// Turkish character set.
	Turkish
	// Spanish character set
	Spanish
	// Portuguese character set
	Portuguese
	// Bengali character set
	Bengali
	// Gujaranti character set
	Gujaranti
	// Hindi character set
	Hindi
	// Kannada character set
	Kannada
	// Malayalam character set
	Malayalam
	// Oriya character set
	Oriya
	// Punjabi character set
	Punjabi
	// Tamil character set
	Tamil
	// Telugu character set
	Telugu
	// Urdu character set
	Urdu

	// End marker for loops (exclusive)
	End
	// Start point for loops (inclusive)
	Start = Turkish
	// Size is for array sizing (excluding default)
	Size = End - Start
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Decoder

type Decoder map[byte]rune

Decoder provides a mapping from GSM7 byte to UTF8 rune.

func DefaultDecoder

func DefaultDecoder() Decoder

DefaultDecoder returns the default mapping table from GSM7 to UTF8.

func DefaultExtDecoder

func DefaultExtDecoder() Decoder

DefaultExtDecoder returns the default extension mapping table from GSM7 to UTF8.

func NewDecoder

func NewDecoder(nli int) Decoder

NewDecoder returns the mapping table from GSM7 to UTF8 for the given language.

func NewExtDecoder

func NewExtDecoder(nli int) Decoder

NewExtDecoder returns the extension mapping table from GSM7 to UTF8 for the given language.

type Encoder

type Encoder map[rune]byte

Encoder provides a mapping from UTF8 rune to GSM7 byte.

func DefaultEncoder

func DefaultEncoder() Encoder

DefaultEncoder returns the default mapping table from UTF8 to GSM7.

func DefaultExtEncoder

func DefaultExtEncoder() Encoder

DefaultExtEncoder returns the default extension mapping table from UTF8 to GSM7.

func NewEncoder

func NewEncoder(nli int) Encoder

NewEncoder returns the mapping table from UTF8 to GSM7 for the given language.

func NewExtEncoder

func NewExtEncoder(nli int) Encoder

NewExtEncoder returns the extension mapping table from UTF8 to GSM7 for the given language.

type NationalLanguageIdentifier

type NationalLanguageIdentifier int

NationalLanguageIdentifier indicates the character set in use, as defined in 3GPP TS 23.038 Section 6.2.1.2.4.

Jump to

Keyboard shortcuts

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