Skip to main content

decode_modified_utf8

Function decode_modified_utf8 

Source
pub fn decode_modified_utf8(
    bytes: &[u8],
    code_unit_budget: usize,
) -> Result<CodeUnitString, ByteError>
Expand description

Decode strict JVM modified UTF-8 into exact UTF-16 code units.

Literal zero, overlong forms other than the required two-byte NUL, four-byte UTF-8, and unpaired surrogates are rejected. No scalar or lossy conversion occurs.