detectEncoding

fnXmlDetectedEncoding detectEncoding(const(ubyte)[] bytes) @safe pure nothrow

Detects the encoding of bytes.

This supports:

  • UTF-8 (default)
  • UTF-16LE/UTF-16BE (BOM and a minimal XML prolog heuristic)

Parameters

bytesInput byte sequence.

Returns

The detected encoding.