Function decode_with_bom_detect

Source
pub fn decode_with_bom_detect(
    encoding: Encoding,
    data: &[u8],
    check: bool,
) -> Result<(String, BomType), Error>
Expand description

Decodes a byte slice to a string using the specified encoding with BOM detection.

  • check - If true, checks for decoding errors and returns an error if any.

Returns the decoded string and the detected BOM type.