Skip to main content

Module detect

Module detect 

Source
Expand description

Encoding detection from raw bytes. Encoding detection from raw HTML bytes.

Implements a simplified version of the HTML spec’s encoding sniffing algorithm: BOM → meta prescan → UTF-8 fallback.

Functions§

detect
Detect the character encoding of raw HTML bytes.