Function xml5ever::encoding::decode
[−]
[src]
pub fn decode(
input: &[u8],
trap: DecoderTrap,
fallback_encoding: &'static Encoding + 'static + Send + Sync
) -> (Result<String, Cow<'static, str>>, &'static Encoding + 'static + Send + Sync)
Determine the encoding by looking for a Byte Order Mark (BOM) and decoded a single string in memory. Return the result and the used encoding.