Skip to main content

Module encoding

Module encoding 

Source
Expand description

Transcoding of UTF-16 XML parts to UTF-8 (ECMA-376 Part 2 allows both encodings for XML parts; every parser in this crate reads UTF-8).

Functionsยง

is_utf16_xml
Whether bytes look like a UTF-16 XML part; see utf16_xml_to_utf8.
utf16_xml_to_utf8
The UTF-8 bytes of bytes when they are a UTF-16 XML part (a byte order mark or <? in either byte order), None when they are not. Unpaired surrogates become U+FFFD.