Module utf8_utils

Module utf8_utils 

Source
Expand description

UTF-8 handling utilities for safe text processing

Functionsยง

decode_attribute_name
Decode attribute name ensuring valid UTF-8
decode_attribute_value
Decode attribute value with unescaping
decode_utf8_at_position
Decode UTF-8 at a specific position with error reporting
handle_text_node
Handle text node from XML event
process_text_content
Process text content from raw bytes, ensuring valid UTF-8
process_text_content_lossy
Process text content with lossy UTF-8 conversion (replaces invalid sequences)
validate_utf8
Validate UTF-8 string without copying
validate_utf8_string
Validate that a string contains only valid UTF-8 characters