pub fn detect_encoding(bytes: &[u8]) -> EncodingExpand description
Detect the text encoding from a sample of bytes
This function delegates to detect_encoding_or_binary and returns only
the encoding, ignoring the binary flag. Use detect_encoding_or_binary
when you need to know if the content should be treated as binary.