pdu

package
v0.0.0-...-24c25ff Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2015 License: GPL-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnevenNumber = errors.New("decode ucs2: uneven number of octets")

ErrUnevenNumber happens when the number of octets (bytes) in the input is uneven.

Functions

func DecodeUcs2

func DecodeUcs2(octets []byte) (str string, err error)

DecodeUcs2 decodes the given UCS2 (UTF-16) octet data into a UTF-8 encoded string.

func EncodeUcs2

func EncodeUcs2(str string) []byte

EncodeUcs2 encodes the given UTF-8 text into UCS2 (UTF-16) encoding and returns the produced octets.

func EncodeUcs2ToString

func EncodeUcs2ToString(str string) string

EncodeUcs2 encodes the given UTF-8 text into UCS2 (UTF-16) encoding and returns the produced string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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