Functions

  • encoding_type check_bom (const uint8_t * byte, size_t length)

    Checks for a BOM. If not, returns unspecified

    Parameters

    byte the string to process
    length the length of the string in code units

    Returns

    the corresponding encoding

  • encoding_type check_bom (const char * byte, size_t length)
  • size_t bom_byte_size (encoding_type bom)

    Returns the size, in bytes, of the BOM for a given encoding type.

    Note that UTF8 BOM are discouraged.

    Parameters

    bom the encoding type

    Returns

    the size in bytes of the corresponding BOM