pub fn auto_decode(input: &[u8]) -> Result<String>Expand description
Automatically detects encoding and decodes the input byte sequence.
§Example
let bytes = vec![0xE4, 0xBD, 0xA0, 0xE5, 0xA5, 0xBD]; // "你好" in UTF-8
let decoded = auto_decode(&bytes)?;
assert_eq!(decoded, "你好");