decode_text_strict

Function decode_text_strict 

Source
pub fn decode_text_strict(
    bytes: &[u8],
    encoding: TextEncoding,
) -> Result<String, DecodeTextError>
Expand description

Decodes bytes into Unicode text using strict lossless behavior.

If the input contains malformed byte sequences for the target encoding, this function returns DecodeTextError instead of inserting replacements.