import "golang.org/x/text/encoding/internal"
Package internal contains code that is shared among encoding implementations.
var ErrASCIIReplacement = RepertoireError(encoding.ASCIISub)
Encoding is an implementation of the Encoding interface that adds the String and ID methods to an existing encoding.
func (e *Encoding) ID() (mib identifier.MIB, other string)
type FuncEncoding struct { Decoder func() transform.Transformer Encoder func() transform.Transformer }
FuncEncoding is an Encoding that combines two functions returning a new Transformer.
func (e FuncEncoding) NewDecoder() *encoding.Decoder
func (e FuncEncoding) NewEncoder() *encoding.Encoder
A RepertoireError indicates a rune is not in the repertoire of a destination encoding. It is associated with an encoding-specific suggested replacement byte.
func (r RepertoireError) Error() string
Error implements the error interrface.
func (r RepertoireError) Replacement() byte
Replacement returns the replacement string associated with this error.
type SimpleEncoding struct { Decoder transform.Transformer Encoder transform.Transformer }
SimpleEncoding is an Encoding that combines two Transformers.
func (e *SimpleEncoding) NewDecoder() *encoding.Decoder
func (e *SimpleEncoding) NewEncoder() *encoding.Encoder
Path | Synopsis |
---|---|
identifier | Package identifier defines the contract between implementations of Encoding and Index by defining identifiers that uniquely identify standardized coded character sets (CCS) and character encoding schemes (CES), which we will together refer to as encodings, for which Encoding implementations provide converters to and from UTF-8. |
Package internal imports 3 packages (graph) and is imported by 7 packages. Updated 5 days ago. Refresh now. Tools for package owners.