pub fn is_safe_byte_range(start: u32) -> boolExpand description
Checks whether a ByteRange dictionary with the given start_codepoint is safe
for encoding all 256 possible byte values (0-255).
A range is considered unsafe if any mapped codepoint falls in:
- U+0000 (NUL) – causes CString/git failures
- U+0001..=U+001F (C0 control characters) – non-printable, break terminals/parsers
- U+007F (DEL) – non-printable control character
- U+0080..=U+009F (C1 control characters) – non-printable, break terminals/parsers
- U+D800..=U+DFFF (surrogates) – invalid in UTF-8,
char::from_u32returns None
A safe start_codepoint must satisfy:
start >= 0x00A0(skips NUL, C0 controls, DEL, and C1 controls)start + 255 < 0xD800ORstart > 0xDFFF(avoids surrogate gap)start + 255 <= 0x10FFFF(stays within Unicode)