dcmstring_to_utf8_with_options

Function dcmstring_to_utf8_with_options 

Source
pub fn dcmstring_to_utf8_with_options(
    doc: &DcMstr,
    permissive: bool,
) -> Result<(Vec<u8>, FormatLog)>
Expand description

Converts a DcMstring to UTF-8 bytes with permissive or strict options.

In permissive mode (permissive == true), characters that cannot be represented as-is in UTF-8 are normalized (DcNormalizationMode::RequiredByTarget) with warnings, and malformed encodings recover with replacement characters and warnings.

In strict mode (permissive == false), characters are not normalized (DcNormalizationMode::None), unrepresentable characters log export errors, and malformed encodings return an error.