Skip to content

Main content

UTF-8 BOM Octet Triplet Tool

Compute utf-8 bom octet triplet from explicit bounded inputs.

Loading tool…

Description

Return octets [239,187,191] when include is true and an empty array otherwise.

Unicode scalar values are distinct from UTF-8 bytes and UTF-16 code units. One scalar can require several units, and printable escape text is a representation of those values rather than execution or normalization of a string.

Return octets [239,187,191] when include is true and an empty array otherwise.

When to use this tool

Use UTF-8 BOM Octet Triplet when inspecting one scalar, code-unit layout or literal escape representation.

How to use the tool and how it works

  1. Enter include. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read octets. Use the output convention below.

Return octets [239,187,191] when include is true and an empty array otherwise. The three decimal octets are EF BB BF in hexadecimal.1

UTF-8 encodes Unicode scalars using constrained one-to-four-octet sequences; an isolated field is not a complete stream validation.2

Input fieldMeaning and unitsAccepted input
includeIncludeRequired. Boolean.
Output fieldInterpretationReturned shape
octetsOctetsRequired. Array of safe integer; maximum items 256.
json
{
  "input": {
    "include": true
  },
  "output": {
    "octets": [
      239,
      187,
      191
    ]
  }
}

Limitations and assumptions

  • This returns a UTF-8 BOM/signature sequence, not text encoding or automatic detection. Whether a BOM is appropriate depends on the consuming format.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.

Alternative or Complementary methods

Use a full Unicode encoder or parser when processing strings, and handle normalization, graphemes and context-specific escaping separately.

References

  1. Calculation and input contract: encode/utf8-bom-octet-triplet — tool.io

  2. UTF-8: RFC 3629 — Internet Engineering Task Force

Similar or alternative tools