ianaindex

package
v1.4.7 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2016 License: GPL-3.0, BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Overview

Package ianaindex maps names to Encodings as specified by the IANA registry. This includes both the MIME and IANA names.

See http://www.iana.org/assignments/character-sets/character-sets.xhtml for more details.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Index

type Index struct {
}

Index maps names registered by IANA to Encodings.

var (
	// MIME is an index to map MIME names. It does not support aliases.
	MIME *Index

	// IANA is an index that supports all names and aliases using IANA names as
	// the canonical identifier.
	IANA *Index
)

func (*Index) Get

func (x *Index) Get(name string) (encoding.Encoding, error)

Get returns an Encoding for IANA-registered names. Matching is case-insensitive.

func (*Index) Name

func (x *Index) Name(e encoding.Encoding) (string, error)

Name reports the canonical name of the given Encoding. It will return an error if the e is not associated with a known encoding scheme.

Jump to

Keyboard shortcuts

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