oem

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Code generated by maketables.go. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

View Source
var (
	ASCII                    = func() Encoding { return ascii{} }
	CP437_DOSLatinUS         = func() Encoding { return Charmap{charmap.CodePage437} }
	CP500_IBMInternational   = func() Encoding { return EBCDIC{ebcdic.EBCDIC500} }
	CP737_DOSGreek           = func() Encoding { return NewCharmap2(cp737_DOSGreek) }
	CP775_DOSBaltRim         = func() Encoding { return NewCharmap2(cp775_DOSBaltRim) }
	CP850_DOSLatin1          = func() Encoding { return Charmap{charmap.CodePage850} }
	CP852_DOSLatin2          = func() Encoding { return Charmap{charmap.CodePage852} }
	CP855_DOSCyrillic        = func() Encoding { return Charmap{charmap.CodePage855} }
	CP857_DOSTurkish         = func() Encoding { return NewCharmap2(cp857_DOSTurkish) }
	CP860_DOSPortuguese      = func() Encoding { return Charmap{charmap.CodePage860} }
	CP861_DOSIcelandic       = func() Encoding { return NewCharmap2(cp861_DOSIcelandic) }
	CP862_DOSHebrew          = func() Encoding { return Charmap{charmap.CodePage862} }
	CP863_DOSCanadaF         = func() Encoding { return Charmap{charmap.CodePage863} }
	CP864_DOSArabic          = func() Encoding { return NewCharmap2(cp864_DOSArabic) }
	CP865_DOSNordic          = func() Encoding { return Charmap{charmap.CodePage863} }
	CP866_DOSCyrillicRussian = func() Encoding { return Charmap{charmap.CodePage866} }
	CP869_DOSGreek2          = func() Encoding { return NewCharmap2(cp869_DOSGreek2) }
	CP874_DOSThai            = func() Encoding { return NewCharmap2(cp874) }
	CP875_IBMGreek           = func() Encoding { return NewCharmap2(cp875_IBMGreek) }
	CP932                    = func() Encoding { return Charmap{japanese.ShiftJIS} }
	CP936                    = func() Encoding { return Charmap{simplifiedchinese.GBK} }
	CP949                    = func() Encoding { return Charmap{korean.EUCKR} }
	CP950                    = func() Encoding { return Charmap{traditionalchinese.Big5} }
	CP1026_IBMLatin5Turkish  = func() Encoding { return NewCharmap2(cp1026_IBMLatin5Turkish) }
	CP1250                   = func() Encoding { return Charmap{charmap.Windows1250} }
	CP1251                   = func() Encoding { return Charmap{charmap.Windows1251} }
	CP1252                   = func() Encoding { return Charmap{charmap.Windows1252} }
	EBCDIC037                = func() Encoding { return EBCDIC{ebcdic.EBCDIC037} }
	EBCDIC1140               = func() Encoding { return EBCDIC{ebcdic.EBCDIC1140} }
	EBCDIC1141               = func() Encoding { return EBCDIC{ebcdic.EBCDIC1141} }
	EBCDIC1148               = func() Encoding { return EBCDIC{ebcdic.EBCDIC1148} }
	EBCDIC273                = func() Encoding { return EBCDIC{ebcdic.EBCDIC273} }
	EBCDIC500                = func() Encoding { return EBCDIC{ebcdic.EBCDIC500} }
)

Functions

func Decode

func Decode(b []byte) (string, error)

Decode function decodes the string from the default OEM encoding.

func Encode

func Encode(s string) ([]byte, error)

Encode function encodes the string to the default OEM encoding.

func WithContext

func WithContext(ctx context.Context, e Encoding) context.Context

func WithDefaultEncoding

func WithDefaultEncoding(e Encoding)

WithDefaultEncoding function sets the default OEM encoding for all top-level encode/decode operations.

Types

type Charmap

type Charmap struct {
	// contains filtered or unexported fields
}

func (Charmap) Decode

func (e Charmap) Decode(b []byte) (string, error)

func (Charmap) Encode

func (e Charmap) Encode(s string) ([]byte, error)

type Charmap2

type Charmap2 struct {
	// contains filtered or unexported fields
}

func NewCharmap2

func NewCharmap2(toUTF8 [256]rune) *Charmap2

func (Charmap2) Decode

func (c2 Charmap2) Decode(b []byte) (string, error)

func (Charmap2) Encode

func (c2 Charmap2) Encode(s string) ([]byte, error)

type EBCDIC

type EBCDIC struct {
	CodePage int
}

func (EBCDIC) Decode

func (e EBCDIC) Decode(b []byte) (string, error)

func (EBCDIC) Encode

func (e EBCDIC) Encode(s string) ([]byte, error)

type Encoding

type Encoding interface {
	// Encode function encodes the string to the OEM encoding.
	Encode(string) ([]byte, error)
	// Decode function decodes the bytes from the OEM encoding.
	Decode([]byte) (string, error)
}

The OEM encoding.

func DefaultEncoding

func DefaultEncoding() Encoding

DefaultEncoding function returns the default OEM encoding.

func FromContext

func FromContext(ctx context.Context) Encoding

Jump to

Keyboard shortcuts

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