encoding

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidEncoding = errors.New("invalid encoding")

Functions

func NewDecoder

func NewDecoder(r io.Reader, enc Encoding) io.Reader

func NewEncoder

func NewEncoder(w io.Writer, enc Encoding, withBOM bool) io.Writer

Types

type Encoding

type Encoding int
const (
	EncodingAuto Encoding = iota
	EncodingUTF8
	EncodingUTF16LE
	EncodingUTF16BE
	EncodingISO88591
	EncodingWindows1252
)

func DetectBOM

func DetectBOM(data []byte) (Encoding, int)

func (Encoding) String

func (e Encoding) String() string

Jump to

Keyboard shortcuts

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