MCPcopy Index your code
hub / github.com/golang/text / Encoding

Interface Encoding

encoding/encoding.go:32–38  ·  view source on GitHub ↗

TODO: - There seems to be some inconsistency in when decoders return errors and when not. Also documentation seems to suggest they shouldn't return errors at all (except for UTF-16). - Encoders seem to rely on or at least benefit from the input being in NFC normal form. Perhaps add an example how us

Source from the content-addressed store, hash-verified

30// Encoding is a character set encoding that can be transformed to and from
31// UTF-8.
32type Encoding interface {
33 // NewDecoder returns a Decoder.
34 NewDecoder() *Decoder
35
36 // NewEncoder returns an Encoder.
37 NewEncoder() *Encoder
38}
39
40// A Decoder converts bytes to UTF-8. It implements transform.Transformer.
41//

Callers 16

TestReplacementFunction · 0.65
decFunction · 0.65
TestASCIIDecoderFunction · 0.65
mainFunction · 0.65
decFunction · 0.65
TransformMethod · 0.65
ExampleUTF8ValidatorFunction · 0.65
TestEncodeInvalidUTF8Function · 0.65
TestReplacementFunction · 0.65
TestErrorHandlerFunction · 0.65

Implementers 8

nopencoding/encoding.go
replacementencoding/encoding.go
utf8bomEncodingencoding/unicode/unicode.go
utf16Encodingencoding/unicode/unicode.go
utf32Encodingencoding/unicode/utf32/utf32.go
SimpleEncodingencoding/internal/internal.go
FuncEncodingencoding/internal/internal.go
Charmapencoding/charmap/charmap.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…