Documentation
¶
Overview ¶
Package charset provides common text encodings for HTML documents.
The mapping from encoding labels to encodings is defined at http://encoding.spec.whatwg.org.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DetermineEncoding ¶
func DetermineEncoding(content []byte, contentType string) (e encoding.Encoding, name string, certain bool)
DetermineEncoding determines the encoding of an HTML document by examining up to the first 1024 bytes of content and the declared Content-Type.
func Lookup ¶
Lookup returns the encoding with the specified label, and its canonical name. It returns nil and the empty string if label is not one of the standard encodings for HTML. Matching is case-insensitive and ignores leading and trailing whitespace.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.