encoding

package
v0.0.0-...-e065539 Latest Latest
Warning

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

Go to latest
Published: May 25, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UTF8 = Decoder{
		DecoderName: "UTF8",
		Decoder:     unicode.UTF8.NewDecoder(),
	}
	CP1250 = Decoder{
		DecoderName: "CP1250",
		Decoder:     charmap.Windows1250.NewDecoder(),
	}
	CP1252 = Decoder{
		DecoderName: "CP1252",
		Decoder:     charmap.Windows1252.NewDecoder(),
	}
	Auto = UTF8DetectingDecoder{
		UTF8:     unicode.UTF8.NewDecoder(),
		Fallback: charmap.Windows1250.NewDecoder(),
	}
)

Functions

This section is empty.

Types

type Decoder

type Decoder struct {
	DecoderName string
	Decoder     *enc.Decoder
}

func (Decoder) Decode

func (d Decoder) Decode(s string) (string, error)

func (Decoder) Name

func (d Decoder) Name() string

type UTF8DetectingDecoder

type UTF8DetectingDecoder struct {
	UTF8     *enc.Decoder
	Fallback *enc.Decoder
}

func (UTF8DetectingDecoder) Decode

func (d UTF8DetectingDecoder) Decode(s string) (string, error)

func (UTF8DetectingDecoder) Name

func (d UTF8DetectingDecoder) Name() string

Jump to

Keyboard shortcuts

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