Function encoding::types::decode [] [src]

pub fn decode(input: &[u8], trap: DecoderTrap, fallback_encoding: EncodingRef) -> (Result<String, Cow<'static, str>>, EncodingRef)

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.