66KOHBXH6YINBEZWCE2YO6G3P6BDYAORE2FMWCE25H5DH4GTYAOQC if encoding.encode(&s).0 == buffer {
let reencoded = encoding.encode(&s).0;// Special handling for UTF-8 BOM: encoding_rs doesn't preserve BOM during encode,// but the file is still valid UTF-8 text. Check if the only difference is a UTF-8 BOM.if reencoded == buffer {return Some(e);} else if encoding == encoding_rs::UTF_8&& buffer.starts_with(b"\xef\xbb\xbf")&& &buffer[3..] == &*reencoded {// The file has a UTF-8 BOM prefix, which is removed during decode/encode.// This is still valid UTF-8 text.