EncodingDetector
in package
FinalYes
Order: explicit encoding → BOM → UTF-16 byte pattern → HEAD.CHAR checked against content.
HEAD.CHAR wins unless the content proves it wrong; a non-standard or ambiguous CHAR (ANSI, LATIN1, …) is resolved from content and reported.
Table of Contents
Constants
- SAMPLE_SIZE : mixed = 65536
Methods
Constants
SAMPLE_SIZE
public
mixed
SAMPLE_SIZE
= 65536
Methods
detect()
public
detect(string $bytes[, Encoding|null $forced = null ][, bool $dialects = true ]) : Detection
Parameters
- $bytes : string
- $forced : Encoding|null = null
- $dialects : bool = true
-
whether documented CHAR mistakes of programs are corrected (KV1010)