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 ¶
Examples ¶
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.
Example ¶
package main
import (
"fmt"
"golang.org/x/text/encoding/charmap"
"golang.org/x/text/encoding/ianaindex"
)
func main() {
fmt.Println(ianaindex.MIME.Name(charmap.ISO8859_7))
fmt.Println(ianaindex.IANA.Name(charmap.ISO8859_7))
e, _ := ianaindex.IANA.Get("cp437")
fmt.Println(ianaindex.IANA.Name(e))
// TODO: Output:
// ISO-8859-7
// ISO8859_7:1987
// IBM437
}
Click to show internal directories.
Click to hide internal directories.