charset

package
v5.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: AGPL-3.0 Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

func Convert(fromEnc string, toEnc string, b []byte) ([]byte, error)

func DetectText added in v5.2.0

func DetectText(content []byte) (string, error)

func Encoding added in v5.2.0

func Encoding(charset string) encoding.Encoding

func NewConvertBytesFunc added in v5.2.0

func NewConvertBytesFunc(fromEnc string, toEnc string) (func([]byte) []byte, error)

func NewConvertFunc added in v5.2.0

func NewConvertFunc(fromEnc string, toEnc string) (func(string) string, error)

func NewDecoderAndEncoder added in v5.2.0

func NewDecoderAndEncoder(fromEnc string, toEnc string) (mahonia.Decoder, mahonia.Encoder, error)

func NewTransformBytesFunc added in v5.2.0

func NewTransformBytesFunc(charset string) (func([]byte) ([]byte, error), error)

func NewTransformFunc added in v5.2.0

func NewTransformFunc(charset string) (func(string) (string, error), error)

func NewTransformReader added in v5.2.0

func NewTransformReader(charset string, src io.Reader) (io.Reader, error)

func NewTransformWriter added in v5.2.0

func NewTransformWriter(charset string, dst io.WriteCloser) (io.WriteCloser, error)

func Register added in v5.2.0

func Register(charset string, encoding encoding.Encoding, alias ...string)

func RuneWith

func RuneWith(str string) int

func Supported added in v5.2.0

func Supported() []string

func Transform added in v5.2.0

func Transform(charset string, content string) (string, error)

func TransformBytes added in v5.2.0

func TransformBytes(charset string, content []byte) ([]byte, error)

func Truncate

func Truncate(str string, width int) string

func Validate

func Validate(enc string) bool

func With

func With(str string) int

Types

This section is empty.

Jump to

Keyboard shortcuts

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