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

pub fn decode(input: &[u8], trap: DecoderTrap, fallback_encoding: EncodingRef) -> (Result<StringCow<'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.