pub fn encode_to_slice( src: impl AsRef<str>, charset: Charset, dst: &mut [u8], ) -> usize
Encodes a UTF-8 string to a DVB text slice with the charset header.
Returns the number of bytes written including the header.