Expand description
Conversions between DcList (&[u128]) and UTF-8 (&[u8]).
DcList is a superset format of UTF-8, where values 0..=0x10FFFF directly
represent Unicode scalar codepoints, and SHORT_DC_OFFSET (1_114_112)
offsets short EITE Document Character IDs. Unmappable DcList values can
be encapsulated into UTF-8 using dcl_basenb (base17) armoring, replaced
with UTF-8 replacement characters (U+FFFD), or skipped.
Structs§
- DcList
Utf8 Settings - Configuration settings for
DcListto/from UTF-8 conversion.
Enums§
- DcNormalization
Mode - Policy for normalizing Document Characters and Unicode during conversion.
Constants§
- DCL_
BASENB_ END_ UUID_ RAW - Raw 16-byte array for End UUID:
27efca19-0439-4bec-b58f-dfff5cd8db9f - DCL_
BASENB_ START_ UUID_ RAW - Raw 16-byte array for Start UUID:
1880aba3-21df-42b2-9c96-e32cd647ffc5
Functions§
- dcl_
basenb_ end_ uuid_ bytes - Returns the base17 UTF-8 bytes for the
DcListend UUID sentinel. - dcl_
basenb_ start_ uuid_ bytes - Returns the base17 UTF-8 bytes for the
DcListstart UUID sentinel. - dclist_
from_ utf8 - Decodes UTF-8 bytes (
&[u8]) into aDcList(Vec<u128>). - dclist_
to_ utf8 - Converts a
DcList(&[u128]) into UTF-8 bytes (Vec<u8>). - dcmstr_
to_ utf8_ with_ options - Projects a Dc document to UTF-8 using the requested equivalence and unmappable-character policies.
- dcmstring_
to_ dctf - Converts a
DcMstringto DcTF bytes. - dcmstring_
to_ dcutf - Converts a
DcMstringto legacy DcUtf bytes. - dcmstring_
to_ utf8 - Converts a
DcMstringto UTF-8 bytes in strict mode (without canonicalization of equivalent Dcs). - dcmstring_
to_ utf8_ with_ normalization - Converts a
DcMstringto UTF-8 bytes with explicit strictness and normalization policy. - dcmstring_
to_ utf8_ with_ options - Converts a
DcMstringto UTF-8 bytes with permissive or strict options. - dctf_
to_ dcmstring - Converts DcTF bytes to a
DcMstring. - dctf_
to_ dcmstring_ with_ options - Converts DcTF bytes to a
DcMstring, optionally in permissive mode. - dcutf_
to_ dcmstring - Converts legacy DcUtf bytes to a
DcMstring. - dcutf_
to_ dcmstring_ with_ options - Converts legacy DcUtf bytes to a
DcMstring, optionally in permissive mode. - normalize_
dclist_ all - Normalizes all deprecated Document Characters (to their canonical or preferred
replacements) and normalizes contiguous Unicode runs to NFC in a
DcList. - normalize_
dcmstring_ all - Normalizes all deprecated Document Characters (to their canonical or preferred
replacements) and normalizes Unicode text chunks to NFC in a
DcMstr, preserving binary chunks intact. - repair_
utf8_ encapsulations - Validates legacy UTF-8 encapsulations, repairing damaged payloads only when permissive mode is enabled. Valid text, framing, and binary chunks are preserved without normalization.
- utf8_
to_ dclist - Alias for
dclist_from_utf8. - utf8_
to_ dcmstring - Converts UTF-8 text bytes to a
DcMstring. - utf8_
to_ dcmstring_ with_ options - Converts UTF-8 text bytes to a
DcMstring, optionally in permissive mode.