pub fn encode(text: &str, enc: Encoding) -> Vec<u8> ⓘ
Encode Unicode; UTF-16 output always includes its byte-order mark.