Expand description
Encoding detection and conversion utilities
This module provides functions for detecting character encoding and converting to UTF-8.
Encoding detection follows this priority order:
- BOM (Byte Order Mark) - highest priority
- HTTP Content-Type charset (if provided)
- XML declaration encoding attribute
- Default to UTF-8
Functionsยง
- convert_
to_ utf8 - Convert data to UTF-8 from detected encoding
- detect_
and_ convert - Detect encoding and convert to UTF-8 in one step
- detect_
encoding - Detect character encoding from byte data
- detect_
encoding_ with_ hint - Detect encoding with optional HTTP Content-Type hint
- extract_
charset_ from_ content_ type - Extract charset from HTTP Content-Type header