Skip to content

detectBOM

detectBOM(binary) → string · XML

Detect the Byte Order Mark type from binary data. Returns the encoding name or null if no BOM found.

  • binary (required): binary data to inspect
utlx
{
  bomType: detectBOM($input.rawData)
}
// Output: {"bomType": "UTF-8"} or {"bomType": null}

Released under AGPL-3.0.