Configure this instance with unicode converters
Was an encoding located in the text (configured via setup)
Return the current encoding. This is either the originally specified encoding, or a derived one obtained by inspecting the content for a BOM. The latter is performed as part of the decode() method
Return the signature (BOM) of the current encoding
Scan the BOM signatures looking for a match. We scan in reverse order to get the longest match first
void[] INPUT2 = "abc\xE3\x81\x82\xE3\x81\x84\xE3\x81\x86".dup; void[] INPUT = "\xef\xbb\xbf" ~ INPUT2; auto bom = new UnicodeBom!(char)(Encoding.Unknown); size_t ate; char[256] buf; auto temp = bom.decode (INPUT, buf, &ate); assert (ate == INPUT.length); assert (bom.encoding == Encoding.UTF_8); temp = bom.decode (INPUT2, buf, &ate); assert (ate == INPUT2.length); assert (bom.encoding == Encoding.UTF_8);
Handle byte-order-mark prefixes