sniffEncoding

fnstring sniffEncoding(const(ubyte)[] bytes, const(char)[] transportCharset = null)

The encoding of the html in bytes, as its canonical name ("UTF-8", "windows-1252", ...). transportCharset is the charset of the HTTP Content-Type, if known: it comes after the BOM and before the <meta>.