Skip to main content

declared_encoding_name

Function declared_encoding_name 

Source
pub fn declared_encoding_name(bytes: &[u8]) -> Option<String>
Expand description

Return the encoding name as written in the document’s <?xml ... encoding="X"?> declaration, if present. Works on the raw bytes before any transcoding, so it reports the name a consumer-supplied converter should key on (e.g. "EUC-JP"), unnormalized.