repair_utf8_encapsulations

Function repair_utf8_encapsulations 

Source
pub fn repair_utf8_encapsulations(
    doc: &DcMstr,
    permissive: bool,
) -> Result<(DcMstring, FormatLog)>
Expand description

Validates legacy UTF-8 encapsulations, repairing damaged payloads only when permissive mode is enabled. Valid text, framing, and binary chunks are preserved without normalization.

ยงErrors

Returns an error for malformed encapsulated text in strict mode or for invalid document data.